register('postWidgetText', [ 'title' => __('Post widget text'), 'url' => $core->adminurl->get('admin.plugin.postWidgetText'), 'small-icon' => dcPage::getPF('postWidgetText/icon.png'), 'large-icon' => dcPage::getPF('postWidgetText/icon-big.png'), 'permissions' => $core->auth->check('usage,contentadmin', $core->blog->id), 'active_cb' => ['postWidgetTextDashboard', 'active'] ]); } /** * Favorites selection. * * @param string $request Requested page * @param array $params Requested parameters */ public static function active($request, $params) { return $request == 'plugin.php' && isset($params['p']) && $params['p'] == 'postWidgetText'; } }