blog->settings->addNamespace('saba');
# widget
require_once dirname(__FILE__) . '/_widgets.php';
# behaviors
$core->addBehavior(
'adminBlogPreferencesForm',
['adminSaba', 'adminBlogPreferencesForm']
);
$core->addBehavior(
'adminBeforeBlogSettingsUpdate',
['adminSaba', 'adminBeforeBlogSettingsUpdate']
);
# add settings to admin blog pref page
class adminSaba
{
public static function adminBlogPreferencesForm($core, $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']));
}
}