diff --git a/_widgets.php b/_widgets.php index d9a5d48..30ba327 100644 --- a/_widgets.php +++ b/_widgets.php @@ -78,28 +78,15 @@ class sabaWidget { dcCore::app()->blog->settings->addNamespace('saba'); - if (!dcCore::app()->blog->settings->saba->active) { + if (!dcCore::app()->blog->settings->saba->active + || !dcCore::app()->blog->settings->saba->error && dcCore::app()->url->type == '404' + || $w->offline + ) { return; } - if (!dcCore::app()->blog->settings->saba->error && dcCore::app()->url->type == '404') { - return; - } - - if ($w->offline) { - return; - } - - $q = dcCore::app()->ctx->saba_otpion ?? ''; - - # title and search - $res = ($w->title ? $w->renderTitle('') : '') . - '
'; - - return $w->renderDiv($w->content_only, $w->class, 'id="search"', $res); + return $w->renderDiv( + $w->content_only, + $w->class, + 'id="search"', + ($w->title ? $w->renderTitle('') : '') . + '' + ); } }