Esempio n. 1
0
 public static function init()
 {
     if (IS_ADMIN()) {
         add_action('admin_enqueue_scripts', array('AdapSC', 'admin_enqueue_css'));
     } else {
         add_action('wp_enqueue_scripts', array('AdapSC', 'enqueue_scripts'));
         add_action('wp_enqueue_scripts', array('AdapSC', 'enqueue_styles'), 901);
         add_action('wp_head', array('AdapSC', 'enqueue_custom_styles'));
         add_action('wp_footer', array('AdapSC', 'enqueue_custom_inline_styles'));
     }
 }
Esempio n. 2
0
function cp_theme_scripts_admin()
{
    if (!IS_ADMIN()) {
        return;
    }
    if (!isset($_POST['setTabIndex'])) {
        $setTabIndex = 0;
    } else {
        $setTabIndex = $_POST['setTabIndex'];
    }
    wp_localize_script('admin-scripts', 'theme_scripts_admin', array('setTabIndex' => $setTabIndex));
}