예제 #1
0
 static function init($options)
 {
     self::$options = $options;
     add_action('wp_dashboard_setup', array(__CLASS__, 'ac_dashboard_setup'), 99);
     add_action('admin_head', array(__CLASS__, 'ac_admin_head_setup'));
     add_action('admin_init', array(__CLASS__, 'ac_remove_update_notices'));
     add_action('admin_menu', array(__CLASS__, 'ac_remove_plugin_update_count'));
     add_filter('admin_user_info_links', array(__CLASS__, 'ac_redirect_on_logout'));
     add_action('login_head', array(__CLASS__, 'ac_login_head_setup'));
     add_filter('login_headerurl', array(__CLASS__, 'ac_login_url'));
     add_filter('login_headertitle', array(__CLASS__, 'ac_login_title'));
     add_filter('admin_footer_text', array(__CLASS__, 'ac_footer_left'));
     add_filter('update_footer', array(__CLASS__, 'ac_footer_right'), 11);
 }
예제 #2
0
function _ac_init()
{
    $textdomain = 'admin-customization';
    load_plugin_textdomain($textdomain, false, dirname(plugin_basename(__FILE__)) . '/lang');
    $dir = dirname(__FILE__);
    $options = new scbOptions('admin-customization', __FILE__, array('favicon' => false, 'login_logo' => false, 'admin_logo' => false, 'admin_footer_left' => false, 'admin_footer_right' => false, 'admin_logo_font_size' => 16, 'widgets' => array(), 'disabled_widgets' => '', 'general_settings' => '', 'style_settings' => array()));
    require_once $dir . '/core.php';
    // initialize the core
    AC_Core::init($options);
    // add admin page
    if (is_admin()) {
        require_once $dir . '/admin/admin.php';
        scbAdminPage::register('AC_Settings', __FILE__, $options);
    }
}