当前位置: 首页>>代码示例>>PHP>>正文


PHP wp_deregister_style函数代码示例

本文整理汇总了PHP中wp_deregister_style函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_deregister_style函数的具体用法?PHP wp_deregister_style怎么用?PHP wp_deregister_style使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了wp_deregister_style函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _s_scripts

/**
 * Enqueue scripts and styles.
 */
function _s_scripts()
{
    /**
     * If WP is in script debug, or we pass ?script_debug in a URL - set debug to true.
     */
    $debug = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG == true || isset($_GET['script_debug']) ? true : false;
    /**
     * If we are debugging the site, use a unique version every page load so as to ensure no cache issues.
     */
    $version = '1.0.0';
    /**
     * Should we load minified scripts? Also enqueue live reload to allow for extensionless reloading.
     */
    $suffix = '.min';
    if (true === $debug) {
        $suffix = '';
        wp_enqueue_script('live-reload', '//localhost:35729/livereload.js', array(), $version, true);
    }
    wp_deregister_style('font-awesome');
    wp_register_style('font-awesome', get_stylesheet_directory_uri() . '/bower_components/fontawesome/css/font-awesome.min.css', array(), $version);
    wp_enqueue_style('font-awesome');
    wp_enqueue_style('_s-google-font', _s_font_url(), array(), null);
    wp_enqueue_style('_s-style', get_stylesheet_directory_uri() . '/style' . $suffix . '.css', array(), $version);
    wp_enqueue_script('_s-project', get_template_directory_uri() . '/js/project' . $suffix . '.js', array('jquery'), $version, true);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
开发者ID:Art2u,项目名称:wd_s,代码行数:31,代码来源:scripts.php

示例2: add_jquery_cropper

 public function add_jquery_cropper()
 {
     wp_deregister_script('jcrop');
     wp_deregister_style('jcrop');
     wp_enqueue_script('jcrop', plugin_dir_url(__FILE__) . '/assets/js/jquery.Jcrop.min.js', array('jquery'), '0.9.12', true);
     wp_enqueue_style('jcrop', plugin_dir_url(__FILE__) . '/assets/css/jquery.Jcrop.min.css', array(), '0.9.12', all);
 }
开发者ID:Twizanex,项目名称:cover-image,代码行数:7,代码来源:wds-bp-cover-photo.php

示例3: woothemes_add_css

 function woothemes_add_css()
 {
     global $woo_options;
     wp_register_style('prettyPhoto', get_template_directory_uri() . '/includes/css/prettyPhoto.css');
     wp_register_style('non-responsive', get_template_directory_uri() . '/css/non-responsive.css');
     // Disable prettyPhoto css if WooCommerce is activated and user is on the product page
     $woocommerce_activated = is_woocommerce_activated();
     $woocommerce_lightbox = get_option('woocommerce_enable_lightbox') == 'yes' ? true : false;
     $woocommerce_product = false;
     if ($woocommerce_activated) {
         $woocommerce_product = is_product();
     }
     if ($woocommerce_activated && $woocommerce_product && $woocommerce_lightbox) {
         wp_deregister_style('prettyPhoto');
     }
     // Conditionally load the Portfolio CSS, where needed.
     $load_portfolio_css = false;
     if (is_page_template('template-portfolio.php') || is_singular() && get_post_type() == 'portfolio' || is_post_type_archive('portfolio') || is_tax('portfolio-gallery')) {
         $load_portfolio_css = true;
     }
     // Allow child themes/plugins to load the portfolio CSS when they need it.
     $load_portfolio_css = apply_filters('woo_load_portfolio_css', $load_portfolio_css);
     if ($load_portfolio_css) {
         wp_enqueue_style('prettyPhoto');
     }
     do_action('woothemes_add_css');
 }
开发者ID:plusplusminus,项目名称:athol,代码行数:27,代码来源:theme-js.php

示例4: enqueueScripts

 public function enqueueScripts()
 {
     foreach ($this->getScripts() as $script) {
         $script = is_array($script) ? $script : ['file' => $script];
         if ($script['file'] = $this->getScriptPath($script['file'])) {
             $info = pathinfo($script['file']);
             $extension = !empty($info['extension']) ? $info['extension'] : (!empty($script['type']) ? $script['type'] : false);
             switch ($extension) {
                 case 'css':
                     $script = array_merge(array('dependencies' => array(), 'version' => '1.0.0', 'media' => 'all', 'enqueue' => true), $script, array('handle' => !empty($script['handle']) ? $script['handle'] : $info['filename']));
                     if (wp_style_is($script['handle'], 'registered')) {
                         wp_deregister_style($script['handle']);
                     }
                     wp_register_style($script['handle'], $script['file'], $script['dependencies'], $script['version'], $script['media']);
                     if ($script['enqueue']) {
                         wp_enqueue_style($script['handle']);
                     }
                     break;
                 default:
                     $script = array_merge(array('dependencies' => array(), 'version' => '1.0.0', 'in_footer' => true, 'localize' => false, 'enqueue' => true), $script, array('handle' => !empty($script['handle']) ? $script['handle'] : $info['filename']));
                     if (wp_script_is($script['handle'], 'registered')) {
                         wp_deregister_script($script['handle']);
                     }
                     wp_register_script($script['handle'], $script['file'], $script['dependencies'], $script['version'], $script['in_footer']);
                     if ($script['localize']) {
                         wp_localize_script($script['handle'], $script['localize']['name'], $script['localize']['data']);
                     }
                     if ($script['enqueue']) {
                         wp_enqueue_script($script['handle']);
                     }
                     break;
             }
         }
     }
 }
开发者ID:darbymanning,项目名称:Family-Church,代码行数:35,代码来源:Controller.php

示例5: scripts

 /**
  * Add our custom stylesheets and scripts
  */
 function scripts()
 {
     $options = get_option('maera_admin_options', array());
     $active_shell = isset($options['shell']) ? $options['shell'] : 'core';
     // Remove the default EDD styles
     wp_dequeue_style('edd-styles');
     // If EDD-Software-Specs is installed, remove its styles
     if (class_exists('EDD_Software_Specs')) {
         wp_dequeue_style('edd-software-specs');
         wp_deregister_style('edd-software-specs');
     }
     // Add our custom styles
     wp_register_style('maera-edd', trailingslashit(get_template_directory_uri()) . 'assets/css/edd/style.css');
     wp_enqueue_style('maera-edd');
     if ('isotope' == get_theme_mod('filter_mode', 'isotope') && (is_archive('download') || is_tax('download_tag') || is_tax('download_category'))) {
         // Register && Enqueue Isotope
         wp_register_script('maera_isotope', trailingslashit(get_template_directory_uri()) . 'assets/vendor/jquery.isotope.min.js', false, null, true);
         wp_enqueue_script('maera_isotope');
         // Register && Enqueue Isotope-Sloppy-Masonry
         wp_register_script('maera_isotope_sloppy_masonry', trailingslashit(get_template_directory_uri()) . 'assets/vendor/jquery.isotope.sloppy-masonry.min.js', false, null, true);
         wp_enqueue_script('maera_isotope_sloppy_masonry');
         wp_enqueue_script('edd_script', trailingslashit(get_template_directory_uri()) . 'assets/js/edd-scripts.js', false, null, true);
         // wp_localize_script( 'maera_foundation_script', 'maera_foundation_script_vars', array(
         //
         //     )
         // );
     }
 }
开发者ID:wpmu,项目名称:maera,代码行数:31,代码来源:class-maera-edd-scripts.php

示例6: deregister_flipcard_scripts

function deregister_flipcard_scripts()
{
    if (!is_page(15)) {
        wp_deregister_style('fc-style');
        wp_deregister_script('fc-script');
    }
}
开发者ID:kawaisin,项目名称:boylan-child,代码行数:7,代码来源:functions.php

示例7: remove_vc_styles

 public function remove_vc_styles()
 {
     if (empty($_REQUEST['vc_editable'])) {
         wp_deregister_style('js_composer_front');
         wp_deregister_script('wpb_composer_front_js');
     }
 }
开发者ID:darbymanning,项目名称:Family-Church,代码行数:7,代码来源:JsComposer.php

示例8: remove_jetpack_styles

function remove_jetpack_styles()
{
    wp_deregister_style('AtD_style');
    // After the Deadline
    wp_deregister_style('jetpack-carousel');
    // Carousel
    wp_deregister_style('grunion.css');
    // Grunion contact form
    wp_deregister_style('the-neverending-homepage');
    // Infinite Scroll
    wp_deregister_style('infinity-twentyten');
    // Infinite Scroll - Twentyten Theme
    wp_deregister_style('infinity-twentyeleven');
    // Infinite Scroll - Twentyeleven Theme
    wp_deregister_style('infinity-twentytwelve');
    // Infinite Scroll - Twentytwelve Theme
    wp_deregister_style('noticons');
    // Notes
    wp_deregister_style('jetpack-subscriptions');
    wp_deregister_style('jetpack-subscriptions-css');
    wp_deregister_style('post-by-email');
    // Post by Email
    wp_deregister_style('publicize');
    // Publicize
    wp_deregister_style('sharedaddy');
    // Sharedaddy
    wp_deregister_style('sharing');
    // Sharedaddy Sharing
    wp_deregister_style('stats_reports_css');
    // Stats
    wp_deregister_style('jetpack-widgets');
    // Widgets
}
开发者ID:Agistopolis,项目名称:lemur2013,代码行数:33,代码来源:functions.php

示例9: enqueue_parent_theme_style

function enqueue_parent_theme_style()
{
    wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
    wp_deregister_style('responsive');
    wp_deregister_style('rehub_shortcode');
    wp_enqueue_style('main_nav', '//fonts.googleapis.com/css?family=Open+Sans:400,700');
}
开发者ID:rhondamoananui,项目名称:rehub,代码行数:7,代码来源:functions.php

示例10: tt_add_jscss

function tt_add_jscss()
{
    if (!is_admin()) {
        wp_deregister_script('jquery');
    }
    if (defined('WPCF7_VERSION')) {
        wp_deregister_style('contact-form-7');
    }
    if (defined('QTX_VERSION')) {
        wp_deregister_style('qtranslate-style');
    }
    if (defined('GOOGLEMAPS')) {
        wp_enqueue_script('googlemaps', '//maps.googleapis.com/maps/api/js?key=' . GOOGLEMAPS, false, null, false);
    }
    wp_enqueue_script('jquery', get_stylesheet_directory_uri() . '/js/libs/_jquery.js', false, null, false);
    if ($js_lib = directoryToArray(get_stylesheet_directory(), '/js/libs/', array('js'))) {
        foreach ($js_lib as $name => $js) {
            wp_enqueue_script($name, $js, array('jquery'), null, true);
        }
    }
    wp_enqueue_script('libs', get_stylesheet_directory_uri() . '/js/lib.js', array('jquery'), null, true);
    wp_enqueue_script('init', get_stylesheet_directory_uri() . '/js/init.js', array('libs'), null, true);
    if ($style_lib = directoryToArray(get_stylesheet_directory(), '/style/libs/', array('css', 'scss'))) {
        foreach ($style_lib as $name => $lib) {
            wp_enqueue_style($name, $lib);
        }
    }
    wp_enqueue_style('main', get_stylesheet_directory_uri() . '/style/style.scss');
    if (class_exists('Woocommerce')) {
        wp_enqueue_style('custom-woo-styles', get_stylesheet_directory_uri() . '/style/woo.scss');
        wp_enqueue_script('custom-woo-scripts', get_stylesheet_directory_uri() . '/js/woo.js', false, null, true);
    }
    wp_enqueue_style('responsive', get_stylesheet_directory_uri() . '/style/rwd.scss');
}
开发者ID:Tusko,项目名称:WP-Anatomy,代码行数:34,代码来源:assets.php

示例11: lshowcase_enqueue_admin_js

function lshowcase_enqueue_admin_js()
{
    wp_deregister_script('lshowcaseadmin');
    wp_register_script('lshowcaseadmin', plugins_url('/js/shortcode-builder.js', __FILE__), array('jquery'));
    wp_enqueue_script('lshowcaseadmin');
    wp_deregister_style('lshowcase-main-style');
    wp_register_style('lshowcase-main-style', plugins_url('/styles.css', __FILE__), array(), false, false);
    wp_enqueue_style('lshowcase-main-style');
    wp_deregister_style('lshowcase-fontawesome');
    wp_register_style('lshowcase-fontawesome', plugins_url('/css/font-awesome/css/font-awesome.css', __FILE__), array(), false, false);
    wp_enqueue_style('lshowcase-fontawesome');
    // in javascript, object properties are accessed as ajax_object.ajax_url, ajax_object.we_value
    wp_localize_script('lshowcaseadmin', 'ajax_object', array('ajax_url' => admin_url('admin-ajax.php')));
    wp_deregister_script('lshowcase-bxslider');
    wp_register_script('lshowcase-bxslider', plugins_url('/bxslider/jquery.bxslider.min.js', __FILE__), array('jquery'), false, false);
    wp_enqueue_script('lshowcase-bxslider');
    wp_deregister_style('lshowcase-bxslider-style');
    wp_register_style('lshowcase-bxslider-style', plugins_url('/bxslider/jquery.bxslider.css', __FILE__), array(), false, false);
    wp_enqueue_style('lshowcase-bxslider-style');
    wp_deregister_script('ls-jquery-ui');
    wp_register_script('ls-jquery-ui', plugins_url('/js/jquery-ui.min.js', __FILE__), array('jquery'), false, false);
    wp_enqueue_script('ls-jquery-ui');
    wp_deregister_script('lshowcase-tooltip');
    wp_register_script('lshowcase-tooltip', plugins_url('/js/tooltip.js', __FILE__), array('ls-jquery-ui'), false, false);
    wp_enqueue_script('lshowcase-tooltip');
    wp_deregister_script('lshowcase-jgrayscale');
    wp_register_script('lshowcase-jgrayscale', plugins_url('/js/grayscale.js', __FILE__), array('jquery'), false, false);
    wp_enqueue_script('lshowcase-jgrayscale');
    wp_deregister_script('lshowcase-hide-filter');
    wp_register_script('lshowcase-hide-filter', plugins_url('/js/filter.js', __FILE__), array('jquery'), false, false);
    wp_enqueue_script('lshowcase-hide-filter');
    wp_deregister_script('lshowcase-enhance-filter');
    wp_register_script('lshowcase-enhance-filter', plugins_url('/js/filter-enhance.js', __FILE__), array('jquery'), false, false);
    wp_enqueue_script('lshowcase-enhance-filter');
}
开发者ID:studiopengpeng,项目名称:ASCOMETAL,代码行数:35,代码来源:shortcode-generator.php

示例12: nebula_dequeues

function nebula_dequeues()
{
    if (!is_admin()) {
        //Styles
        wp_deregister_style('cff-font-awesome');
        //Custom Facebook Feed - We enqueue the latest version of Font Awesome ourselves
        wp_deregister_style('contact-form-7');
        //Contact Form 7 - Not sure specifically what it is styling, so removing it unless we decide we need it.
        //Scripts
        if (!preg_match('/(?i)msie [2-8]/', $_SERVER['HTTP_USER_AGENT'])) {
            //WP Core - Dequeue jQuery Migrate for browsers that don't need it.
            wp_deregister_script('jquery');
            wp_register_script('jquery', false, array('jquery-core'), '1.11.0');
            //Just have to make sure this version reflects the actual jQuery version bundled with WP (click the jquery.js link in the source)
        }
        //Page specific dequeues
        if (is_front_page()) {
            //Styles
            wp_deregister_style('thickbox');
            //WP Core Thickbox - Comment out if thickbox type gallery IS used on the homepage.
            //Scripts
            wp_deregister_script('thickbox');
            //WP Thickbox - Comment out if thickbox type gallery IS used on the homepage.
        }
    }
}
开发者ID:CloouCom,项目名称:Nebula,代码行数:26,代码来源:nebula_optimization.php

示例13: admin_enqueue_scripts

 public static function admin_enqueue_scripts()
 {
     wp_deregister_style('open-sans');
     #wp_enqueue_style( 'open-sans', false );
     wp_enqueue_style('open-sans', get_template_directory_uri() . '/webfonts.css');
     wp_enqueue_style('editor-style', get_template_directory_uri() . '/editor-style.css', array('open-sans'));
 }
开发者ID:jimmyandrade,项目名称:flegondavid.com.br,代码行数:7,代码来源:class-theme-scripts.php

示例14: theme_enqueue_styles

function theme_enqueue_styles()
{
    // Remove main stylesheet.
    wp_deregister_style('wps_prime-style');
    // Add child style.
    wp_enqueue_style('child-style', get_stylesheet_directory_uri() . '/style.css');
}
开发者ID:Zsolt-R,项目名称:wps-prime-child,代码行数:7,代码来源:functions.php

示例15: TheTheIS_Style

function TheTheIS_Style()
{
    $x = WP_PLUGIN_URL . '/' . str_replace(basename(__FILE__), "", plugin_basename(__FILE__));
    if (get_bloginfo('version') < 3.3) {
        wp_admin_css('nav-menu');
    }
    wp_deregister_style('thethefly-plugin-panel-interface');
    wp_register_style('thethefly-plugin-panel-interface', $x . 'style/admin/interface.css');
    wp_enqueue_style('thethefly-plugin-panel-interface');
    wp_enqueue_script('postbox');
    wp_enqueue_script('post');
    wp_deregister_style('thethefly-color-picker');
    wp_register_script('thethefly-color-picker', $GLOBALS['TheTheIS']['wp_plugin_dir_url'] . 'style/admin/js/color-picker.js');
    // Color picker
    wp_enqueue_style('farbtastic');
    wp_enqueue_script('thethefly-color-picker');
    wp_enqueue_script('farbtastic', false, array('thethefly-color-picker'));
    wp_enqueue_script('media-upload');
    wp_enqueue_script('thickbox');
    wp_enqueue_script("jquery-ui-sortable");
    wp_enqueue_script("jquery-ui-draggable");
    wp_enqueue_style('thickbox');
    wp_enqueue_script('thethe-slider-admin-js', $x . "style/admin/thethe-image-slider-admin.js");
    wp_enqueue_script('jquery-form');
    wp_enqueue_style('thethe-slider-admin-css', $x . 'style/admin/thethe-image-slider-admin.css', false, false, 'screen');
}
开发者ID:fwelections,项目名称:fwelections,代码行数:26,代码来源:thethe-admin.php


注:本文中的wp_deregister_style函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。