use svg icon
parent
bbda2b142f
commit
84bf5d08a0
|
@ -21,7 +21,7 @@ if (dcCore::app()->blog->settings->postwidgettext->postwidgettext_active) {
|
|||
dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem(
|
||||
__('Post widget text'),
|
||||
dcCore::app()->adminurl->get('admin.plugin.postWidgetText'),
|
||||
dcPage::getPF('postWidgetText/icon.png'),
|
||||
dcPage::getPF('postWidgetText/icon.svg'),
|
||||
preg_match('/' . preg_quote(dcCore::app()->adminurl->get('admin.plugin.postWidgetText')) . '(&.*)?$/', $_SERVER['REQUEST_URI']),
|
||||
dcCore::app()->auth->check(dcAuth::PERMISSION_CONTENT_ADMIN, dcCore::app()->blog->id)
|
||||
);
|
||||
|
|
BIN
icon-big.png
BIN
icon-big.png
Binary file not shown.
Before Width: | Height: | Size: 794 B |
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="64px" height="64px" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve"> <image id="image0" width="64" height="64" x="0" y="0"
|
||||
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
|
||||
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAilBMVEUAAABnbnhnbniawSOa
|
||||
wSOawSOawSOawSOawSOawSPETViawSOawSOawSOawSOawSOawSOawSNnbnhnbnhnbnhnbngTe7tn
|
||||
bnhnbnhnbnhnbnhnbnjETVjETVjETVjETVjETVjETVjETVjETVjETVjETVjETVjETVjETVhnbnia
|
||||
wSPETVgTe7v///9kF9VQAAAAKXRSTlMA31Agr++An2C/n89A3xBQcDBAMGDvnxC/gK8gMIBwIGCP
|
||||
UN8Q769Az1XOQMkAAAABYktHRC3N2kE9AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAB3RJTUUH5gsa
|
||||
EAAKuE6euwAAASxJREFUWMPt12kPgjAMBuBuKCoeeIC34q2A///3Oc+5IdIyY4zh/YjpE9ZBhxAi
|
||||
wziIWKXoKWVbXMICYSgEqxypqVAABlCK9FQBGyEAJOqjWgEUwB1w4pdx0ECcku8B+CXUE4BNa2JD
|
||||
r2+2aAC46kCoW+j6GwAt136k3cGXP4D8+RzQlenlADxfGZME4gp42qD1L0L/+DZ9CQx8fVQPz78d
|
||||
MyIBnhz2NGD0GsAvIQXAN/F/AeMmGm+j8YNk8iiPTV+mCREAzpRXCV8vB8pEDpQBvvz9SMM3MSX4
|
||||
bRSZzmTmAR3QjsEFdQlL/QBd0ZoYJE7gNQ1YZHwDZAKzAvhRIESHmQLcDLj87cvRA/XwKQCAVa5d
|
||||
YBLYbPX6HQLgkH4L2yATYFxZ0v7wXO9s4ARgukreO1JMPAAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAy
|
||||
Mi0xMS0yNlQxNTowMDoxMCswMTowMOPS2NEAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMTEtMjZU
|
||||
MTU6MDA6MTArMDE6MDCSj2BtAAAAGnRFWHRTb2Z0d2FyZQBQYWludC5ORVQgdjMuNS4xMUfzQjcA
|
||||
AAAASUVORK5CYII=" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
|
@ -70,29 +70,15 @@ class adminPostWidgetText
|
|||
$favs->register('postWidgetText', [
|
||||
'title' => __('Post widget text'),
|
||||
'url' => dcCore::app()->adminurl->get('admin.plugin.postWidgetText'),
|
||||
'small-icon' => dcPage::getPF('postWidgetText/icon.png'),
|
||||
'large-icon' => dcPage::getPF('postWidgetText/icon-big.png'),
|
||||
'small-icon' => dcPage::getPF('postWidgetText/icon.svg'),
|
||||
'large-icon' => dcPage::getPF('postWidgetText/icon.svg'),
|
||||
'permissions' => dcCore::app()->auth->check(dcCore::app()->auth->makePermissions([
|
||||
dcAuth::PERMISSION_USAGE,
|
||||
dcAuth::PERMISSION_CONTENT_ADMIN,
|
||||
]), dcCore::app()->blog->id),
|
||||
'active_cb' => ['adminPostWidgetText', 'adminDashboardFavoritesActive'],
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Favorites selection.
|
||||
*
|
||||
* @param string $request Requested page
|
||||
* @param array $params Requested parameters
|
||||
*/
|
||||
public static function adminDashboardFavoritesActive($request, $params)
|
||||
{
|
||||
return $request == 'plugin.php'
|
||||
&& isset($params['p'])
|
||||
&& $params['p'] == 'postWidgetText';
|
||||
}
|
||||
|
||||
public static function adminPostHeaders()
|
||||
{
|
||||
$editor = dcCore::app()->auth->getOption('editor');
|
||||
|
|
Loading…
Reference in New Issue