2018-02-19 18:10:58 +00:00
|
|
|
<?php
|
2021-09-06 22:09:09 +00:00
|
|
|
/**
|
|
|
|
* @brief dcAdvancedCleaner, a plugin for Dotclear 2
|
|
|
|
*
|
|
|
|
* @package Dotclear
|
|
|
|
* @subpackage Plugin
|
|
|
|
*
|
|
|
|
* @author Jean-Christian Denis and Contributors
|
|
|
|
*
|
|
|
|
* @copyright Jean-Christian Denis
|
|
|
|
* @copyright GPL-2.0 https://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
*/
|
2018-02-19 18:10:58 +00:00
|
|
|
|
|
|
|
if (!defined('DC_CONTEXT_ADMIN')){return;}
|
|
|
|
|
|
|
|
$_menu['Plugins']->addItem(
|
2021-09-06 22:09:09 +00:00
|
|
|
__('Advanced cleaner'),
|
|
|
|
'plugin.php?p=dcAdvancedCleaner',
|
|
|
|
'index.php?pf=dcAdvancedCleaner/icon.png',
|
|
|
|
preg_match('/plugin.php\?p=dcAdvancedCleaner(&.*)?$/',$_SERVER['REQUEST_URI']),
|
|
|
|
$core->auth->isSuperAdmin()
|
2018-02-19 18:10:58 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
$core->addBehavior('adminDashboardFavorites','dcAdvancedCleanerDashboardFavorites');
|
|
|
|
|
|
|
|
function dcAdvancedCleanerDashboardFavorites($core,$favs)
|
|
|
|
{
|
2021-09-06 22:09:09 +00:00
|
|
|
$favs->register('dcAdvancedCleaner', array(
|
|
|
|
'title' => __('Advanced cleaner'),
|
|
|
|
'url' => 'plugin.php?p=dcAdvancedCleaner',
|
|
|
|
'small-icon' => 'index.php?pf=dcAdvancedCleaner/icon.png',
|
|
|
|
'large-icon' => 'index.php?pf=dcAdvancedCleaner/icon-big.png',
|
|
|
|
'permissions' => 'usage,contentadmin'
|
|
|
|
));
|
2018-02-19 18:10:58 +00:00
|
|
|
}
|