function ci_enqueue_admin_scripts() { global $pagenow; // // Enqueue here scripts and styles that are to be loaded on all admin pages. // if ($pagenow == 'post-new.php' || $pagenow == 'post.php') { // // Enqueue here scripts and styles that are to be loaded only on post edit screens. // if (current_theme_supports('post-formats')) { wp_enqueue_script('ci-post-formats'); wp_enqueue_style('ci-post-formats'); } wp_enqueue_script('ci-panel-post-edit-screens'); wp_enqueue_style('ci-panel-post-edit-screens'); } if ($pagenow == 'themes.php' && isset($_GET['page']) && $_GET['page'] == 'ci_panel.php') { // // Enqueue here scripts and styles that are to be loaded only on CSSIgniter Settings panel. // global $wp_version; wp_enqueue_style('wp-color-picker'); wp_enqueue_script('wp-color-picker'); wp_enqueue_media(); ci_enqueue_media_manager_scripts(); wp_enqueue_script('ci-panel'); wp_enqueue_style('ci-panel-css'); } }
function ci_load_post_scripts($hook) { // // Add here all scripts and styles, to load on all admin pages. // if (in_array($hook, array('post.php', 'post-new.php')) and in_array(get_post_type(), array('cpt_artist', 'cpt_gallery', 'cpt_video', 'cpt_discography', 'cpt_event', 'cpt_slider', 'post', 'page'))) { // // Add here all scripts and styles, specific to post edit screens. // wp_enqueue_media(); ci_enqueue_media_manager_scripts(); wp_enqueue_script('jquery-gmaps-latlon-picker'); wp_enqueue_style('jquery-ui-style'); wp_enqueue_style('jquery-ui-timepicker'); ci_localize_datepicker(); wp_enqueue_script('jquery-ui-slider'); wp_enqueue_script('jquery-ui-timepicker'); wp_enqueue_style('ci-post-edit-screens'); wp_enqueue_script('ci-post-edit-scripts'); } }
static function _enqueue_admin_scripts() { global $pagenow; if (in_array($pagenow, array('widgets.php', 'customize.php'))) { wp_enqueue_style('wp-color-picker'); wp_enqueue_script('wp-color-picker'); wp_enqueue_media(); ci_enqueue_media_manager_scripts(); } }