blog->settings->addNamespace('saba'); # widget require_once __DIR__ . '/_widgets.php'; # behaviors dcCore::app()->addBehavior( 'adminBlogPreferencesFormV2', ['adminSaba', 'adminBlogPreferencesForm'] ); dcCore::app()->addBehavior( 'adminBeforeBlogSettingsUpdate', ['adminSaba', 'adminBeforeBlogSettingsUpdate'] ); # add settings to admin blog pref page class adminSaba { public static function adminBlogPreferencesForm($blog_settings) { echo '
' . '

' . __('Search Across Blog Archive') . '

' . '

' . '

' . '

' . __('This suggests visitors some posts on page 404.') . '

' . '
'; } public static function adminBeforeBlogSettingsUpdate($blog_settings) { $blog_settings->saba->put('active', !empty($_POST['saba_active'])); $blog_settings->saba->put('error', !empty($_POST['saba_error'])); } }