*/
use Shaarli\Config\ConfigManager;
+use Shaarli\Plugin\PluginManager;
+use Shaarli\Router;
/**
* In the footer hook, there is a working example of a translation extension for Shaarli.
{
// Only execute when linklist is rendered.
if ($data['_PAGE_'] == Router::$PAGE_LINKLIST) {
-
// If loggedin
if ($data['_LOGGEDIN_'] === true) {
/*
* ],
* ]
* This example renders as:
- * <form form-attribute-1="form attribute 1 value" form-attribute-2="form attribute 2 value">
- * <input input-1-attribute-1="input 1 attribute 1 value" input-1-attribute-2="input 1 attribute 2 value">
- * <input input-2-attribute-1="input 2 attribute 1 value">
- * </form>
+ * <form form-attribute-1="form attribute 1 value" form-attribute-2="form attribute 2 value">
+ * <input input-1-attribute-1="input 1 attribute 1 value" input-1-attribute-2="input 1 attribute 2 value">
+ * <input input-2-attribute-1="input 2 attribute 1 value">
+ * </form>
*/
$form = array(
'attr' => array(
// Manipulate columns data
- foreach ($data['cols'] as &$value) {
- foreach ($value as &$value2) {
- $value2['formatedDescription'] .= ' ಠ_ಠ';
- }
+ foreach ($data['linksToDisplay'] as &$value) {
+ $value['formatedDescription'] .= ' ಠ_ಠ';
}
// Add plugin content at the end of each link
- foreach ($data['cols'] as &$value) {
- foreach ($value as &$value2) {
- $value2['link_plugin'][] = 'DEMO';
- }
+ foreach ($data['linksToDisplay'] as &$value) {
+ $value['link_plugin'][] = 'DEMO';
}
return $data;
foreach ($data['links'] as &$link) {
if ($data['_PAGE_'] == Router::$PAGE_FEED_ATOM) {
$link['description'] .= ' - ATOM Feed' ;
- }
- elseif ($data['_PAGE_'] == Router::$PAGE_FEED_RSS) {
+ } elseif ($data['_PAGE_'] == Router::$PAGE_FEED_RSS) {
$link['description'] .= ' - RSS Feed';
}
}