use Utils method
parent
320a1ed91c
commit
19dba282e3
|
@ -46,7 +46,7 @@ class Backend extends dcNsProcess
|
|||
}
|
||||
|
||||
// backend sidebar menu icon
|
||||
if (dcCore::app()->blog->settings->get(My::id())->get('active')) {
|
||||
if (Utils::isActive()) {
|
||||
dcCore::app()->menu[dcAdmin::MENU_PLUGINS]->addItem(
|
||||
My::name(),
|
||||
dcCore::app()->adminurl->get('admin.plugin.' . My::id()),
|
||||
|
|
|
@ -66,10 +66,9 @@ class Widgets
|
|||
*/
|
||||
public static function parseWidget(WidgetsElement $w): string
|
||||
{
|
||||
if (is_null(dcCore::app()->blog)
|
||||
if ($w->__get('offline')
|
||||
|| !Utils::isActive()
|
||||
|| is_null(dcCore::app()->ctx)
|
||||
|| $w->__get('offline')
|
||||
|| !dcCore::app()->blog->settings->get(My::id())->get('active')
|
||||
|| !dcCore::app()->ctx->exists('posts')
|
||||
|| !dcCore::app()->ctx->__get('posts')->f('post_id')
|
||||
) {
|
||||
|
|
Loading…
Reference in New Issue