• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wp_style_add_data函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: bp_core_register_common_styles

/**
 * Register styles commonly used by BuddyPress.
 *
 * @since 2.1.0
 */
function bp_core_register_common_styles()
{
    $min = bp_core_get_minified_asset_suffix();
    $url = buddypress()->plugin_url . 'bp-core/css/';
    /**
     * Filters the URL for the Admin Bar stylesheet.
     *
     * @since 1.1.0
     *
     * @param string $value URL for the Admin Bar stylesheet.
     */
    $admin_bar_file = apply_filters('bp_core_admin_bar_css', "{$url}admin-bar{$min}.css");
    /**
     * Filters the BuddyPress Core stylesheet files to register.
     *
     * @since 2.1.0
     *
     * @param array $value Array of stylesheet file information to register.
     */
    $styles = apply_filters('bp_core_register_common_styles', array('bp-admin-bar' => array('file' => $admin_bar_file, 'dependencies' => array('admin-bar')), 'bp-avatar' => array('file' => "{$url}avatar{$min}.css", 'dependencies' => array('jcrop'))));
    foreach ($styles as $id => $style) {
        wp_register_style($id, $style['file'], $style['dependencies'], bp_get_version());
        wp_style_add_data($id, 'rtl', true);
        if ($min) {
            wp_style_add_data($id, 'suffix', $min);
        }
    }
}
开发者ID:igniterealtime,项目名称:community-plugins,代码行数:33,代码来源:bp-core-cssjs.php


示例2: tinytheme_scripts_and_styles_setup

function tinytheme_scripts_and_styles_setup()
{
    // Load the icon font stylesheet
    wp_enqueue_style('tinytheme-icon-font', get_template_directory_uri() . '/stylesheet/font-awesome.min.css');
    wp_enqueue_style('tinytheme-icon-font-ie', get_template_directory_uri() . '/stylesheet/font-awesome-ie7.min.css', array('tinytheme-icon-font'));
    wp_style_add_data('tinytheme-icon-font-ie', 'conditional', 'IE 7');
}
开发者ID:seraphyn,项目名称:tinytheme,代码行数:7,代码来源:functions.php


示例3: enqueue_styles

 /**
  * Enqueue Storefront Styles
  *
  * @return void
  */
 public function enqueue_styles()
 {
     global $storefront_version, $storechild_version;
     /**
      * Styles
      */
     wp_enqueue_style('storefront-style', get_template_directory_uri() . '/style.css', $storefront_version);
     wp_style_add_data('storefront-child-style', 'rtl', 'replace');
     /**
      * Javascript
      */
     wp_enqueue_script('storechild', get_stylesheet_directory_uri() . '/assets/js/storechild.min.js', array('jquery'), $storechild_version, true);
 }
开发者ID:woothemes,项目名称:storechild,代码行数:18,代码来源:class-storechild.php


示例4: ambition_scripts_styles_method

/**
 * Register jquery scripts
 */
function ambition_scripts_styles_method()
{
    global $disable_slider, $ambition_settings;
    /**
     * Loads our main stylesheet.
     */
    // Load our main stylesheet.
    wp_enqueue_style('ambition_style', get_stylesheet_uri());
    wp_style_add_data('ambition-ie', 'conditional', 'lt IE 9');
    /**
     * Adds JavaScript to pages with the comment form to support
     * sites with threaded comments (when in use).
     */
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('jquery_cycle', get_template_directory_uri() . '/js/jquery.cycle.all.min.js', array('jquery'), '2.9999.5', true);
    wp_enqueue_style('ambition-fonts', ambition_font_url(), array(), null);
    /**
     * Enqueue Slider setup js file.
     * Enqueue Fancy Box setup js and css file.
     */
    $disable_slider = $ambition_settings['disable_slider'];
    if ((is_home() || is_front_page()) && empty($disable_slider)) {
        wp_enqueue_script('ambition_slider', get_template_directory_uri() . '/js/ambition-slider-setting.js', array('jquery_cycle'), false, true);
    }
    wp_enqueue_script('scripts', get_template_directory_uri() . '/js/scripts.js', array('jquery'), false, true);
    wp_enqueue_style('ambition-fonts');
}
开发者ID:awwong1,项目名称:esps-wpsite,代码行数:32,代码来源:functions.php


示例5: add_scripts

/**
 * @author Vanderson Sena
 * @since Quatro Rodas
 */
function add_scripts()
{
    // Add Genericons, used in the main stylesheet.
    wp_enqueue_style('genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.4.1');
    // Theme stylesheet.
    wp_enqueue_style('quatrorodas-style', get_stylesheet_uri());
    // Load the Internet Explorer specific stylesheet.
    wp_enqueue_style('quatrorodas-ie', get_template_directory_uri() . '/css/ie.css', array('quatrorodas-style'), '20150825');
    wp_style_add_data('quatrorodas-ie', 'conditional', 'lt IE 10');
    // Load the Internet Explorer 8 specific stylesheet.
    wp_enqueue_style('quatrorodas-ie8', get_template_directory_uri() . '/css/ie8.css', array('quatrorodas-style'), '20150825');
    wp_style_add_data('quatrorodas-ie8', 'conditional', 'lt IE 9');
    // Load the Internet Explorer 7 specific stylesheet.
    wp_enqueue_style('quatrorodas-ie7', get_template_directory_uri() . '/css/ie7.css', array('quatrorodas-style'), '20150825');
    wp_style_add_data('quatrorodas-ie7', 'conditional', 'lt IE 8');
    // Load the html5 shiv.
    wp_enqueue_script('quatrorodas-html5', get_template_directory_uri() . '/js/html5.js', array(), '3.7.3');
    wp_script_add_data('quatrorodas-html5', 'conditional', 'lt IE 9');
    wp_enqueue_script('quatrorodas-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20150825', true);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    if (is_singular() && wp_attachment_is_image()) {
        wp_enqueue_script('quatrorodas-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array('jquery'), '20150825');
    }
    wp_enqueue_script('quatrorodas-script', get_template_directory_uri() . '/js/functions.js', array('jquery'), '20150825', true);
    wp_localize_script('quatrorodas-script', 'screenReaderText', array('expand' => __('expand child menu', 'quatrorodas'), 'collapse' => __('collapse child menu', 'quatrorodas')));
}
开发者ID:vandersonsena,项目名称:wp-4rodas,代码行数:32,代码来源:functions.php


示例6: allurer_scripts

function allurer_scripts()
{
    global $wp_styles;
    // Bump this when changes are made to bust cache
    $allurer_theme = wp_get_theme();
    $version = $allurer_theme->get('Version');
    // CSS Scripts
    // Add our fonts, used in the main stylesheet.
    wp_enqueue_style('allurer-fonts', allurer_font_url(), array(), null);
    wp_enqueue_style('allurer-style', get_template_directory_uri() . '/assets/css/style.css', false, $version, 'all');
    wp_enqueue_style('allurer-bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.css', false, $version, 'all');
    wp_enqueue_style('allurer-custom', get_template_directory_uri() . '/assets/css/custom.css', false, $version, 'all');
    wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/font-awesome/css/font-awesome.css', false, $version, 'all');
    // Load style.css from child theme
    if (is_child_theme()) {
        wp_enqueue_style('allurer-child', get_stylesheet_uri(), false, $version, null);
    }
    // Loads the Internet Explorer specific stylesheet.
    wp_enqueue_style('allurer-ie', get_template_directory_uri() . '/assets/css/ie.css', array('allurer-style'), $version);
    wp_style_add_data('allurer-ie', 'conditional', 'lt IE 8');
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('bootstrap.js', get_template_directory_uri() . '/assets/js/bootstrap.js', array('jquery'), $version, true);
    wp_enqueue_script('allurer-custom-js', get_template_directory_uri() . '/assets/js/custom.js', array('jquery'), false, true);
    wp_enqueue_script('modernizr.js', get_template_directory_uri() . '/assets/js/modernizr.custom.79639.js', array('jquery'), $version, false);
    wp_enqueue_script('allurer-html5shiv', get_template_directory_uri() . '/js/html5.js', array(), '3.7.0', false);
}
开发者ID:ChuanGz,项目名称:Source_web,代码行数:28,代码来源:scripts.php


示例7: zerif_scripts

function zerif_scripts()
{
    wp_enqueue_style('zerif_font', zerif_slug_fonts_url(), array(), null);
    wp_enqueue_style('zerif_font_all', '//fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600italic,600,700,700italic,800,800italic');
    wp_enqueue_style('zerif_bootstrap_style', get_template_directory_uri() . '/assets/css/bootstrap.css');
    wp_style_add_data('zerif_bootstrap_style', 'rtl', 'replace');
    wp_enqueue_style('zerif_fontawesome', get_template_directory_uri() . '/assets/css/font-awesome.min.css', array(), 'v1');
    wp_enqueue_style('zerif_pixeden_style', get_template_directory_uri() . '/assets/css/pixeden-icons.css', array('zerif_fontawesome'), 'v1');
    wp_enqueue_style('zerif_style', get_stylesheet_uri(), array('zerif_pixeden_style'), 'v1');
    wp_enqueue_style('zerif_responsive_style', get_template_directory_uri() . '/assets/css/responsive.css', array('zerif_style'), 'v1');
    if (wp_is_mobile()) {
        wp_enqueue_style('zerif_style_mobile', get_template_directory_uri() . '/assets/css/style-mobile.css', array('zerif_bootstrap_style', 'zerif_style'), 'v1');
    }
    wp_enqueue_script('jquery');
    wp_enqueue_script('zerif_bootstrap_script', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array(), '20120206', true);
    wp_enqueue_script('zerif_knob_nav', get_template_directory_uri() . '/assets/js/jquery.knob.js', array("jquery"), '20120206', true);
    wp_enqueue_script('zerif_smoothscroll', get_template_directory_uri() . '/assets/js/smoothscroll.js', array("jquery"), '20120206', true);
    if (!wp_is_mobile()) {
        wp_enqueue_script('zerif_scrollReveal_script', get_template_directory_uri() . '/assets/js/scrollReveal.js', array("jquery"), '20120206', true);
    }
    wp_enqueue_script('zerif_script', get_template_directory_uri() . '/assets/js/zerif.js', array("jquery", "zerif_knob_nav"), '20120206', true);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
开发者ID:selique,项目名称:dev-site,代码行数:25,代码来源:functions.php


示例8: bp_activity_mentions_script

/**
 * Enqueue @mentions JS.
 *
 * @since 2.1.0
 */
function bp_activity_mentions_script()
{
    if (!bp_activity_maybe_load_mentions_scripts()) {
        return;
    }
    // Special handling for New/Edit screens in wp-admin.
    if (is_admin()) {
        if (!get_current_screen() || !in_array(get_current_screen()->base, array('page', 'post')) || !post_type_supports(get_current_screen()->post_type, 'editor')) {
            return;
        }
    }
    $min = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
    wp_enqueue_script('bp-mentions', buddypress()->plugin_url . "bp-activity/js/mentions{$min}.js", array('jquery', 'jquery-atwho'), bp_get_version(), true);
    wp_enqueue_style('bp-mentions-css', buddypress()->plugin_url . "bp-activity/css/mentions{$min}.css", array(), bp_get_version());
    wp_style_add_data('bp-mentions-css', 'rtl', true);
    if ($min) {
        wp_style_add_data('bp-mentions-css', 'suffix', $min);
    }
    // If the script has been enqueued, let's attach our mentions TinyMCE init callback.
    add_filter('tiny_mce_before_init', 'bp_add_mentions_on_tinymce_init', 10, 2);
    /**
     * Fires at the end of the Activity Mentions script.
     *
     * This is the hook where BP components can add their own prefetched results
     * friends to the page for quicker @mentions lookups.
     *
     * @since 2.1.0
     */
    do_action('bp_activity_mentions_prime_results');
}
开发者ID:swissspidy,项目名称:BuddyPress,代码行数:35,代码来源:bp-activity-cssjs.php


示例9: in_the_beginning_enqueue_assets

/**
 * Enqueue theme assets.
 *
 * @since 1.0.0
 */
function in_the_beginning_enqueue_assets()
{
    // Load Google fonts
    wp_enqueue_style('in-the-beginning-fonts', in_the_beginning_fonts_url(), array(), null);
    // Replace style.css with style-rtl.css for RTL languages
    wp_style_add_data('in-the-beginning', 'rtl', 'replace');
}
开发者ID:dpav02,项目名称:in-the-beginning,代码行数:12,代码来源:functions.php


示例10: twentysixteen_infinite_scroll_enqueue_styles

/**
 * Enqueue CSS stylesheet with theme styles for Infinite Scroll.
 */
function twentysixteen_infinite_scroll_enqueue_styles()
{
    if (wp_script_is('the-neverending-homepage')) {
        wp_enqueue_style('infinity-twentysixteen', plugins_url('twentysixteen.css', __FILE__), array('the-neverending-homepage'), '20151102');
        wp_style_add_data('infinity-twentysixteen', 'rtl', 'replace');
    }
}
开发者ID:kanei,项目名称:vantuch.cz,代码行数:10,代码来源:twentysixteen.php


示例11: utthehill_scripts_styles

/**
 * Enqueue scripts and styles for the front end.
 *
 * @since Twenty Thirteen 1.0
 *
 * @return void
 */
function utthehill_scripts_styles()
{
    if (!is_admin()) {
        wp_deregister_script('jquery');
        wp_register_script('jquery', "//code.jquery.com/jquery-1.11.2.min.js", array(), null, false);
        wp_enqueue_script('jquery');
    }
    /*
     * Adds JavaScript to pages with the comment form to support
     * sites with threaded comments (when in use).
     */
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    // Loads UTK JavaScript with added object data fromthe WP table
    // FOR TESTING
    // wp_register_script( 'utthehill-utk', get_template_directory_uri() . '/library/js/build/utk-build.js', array( 'jquery' ), '2015-05-13', true );
    // FOR PROD
    wp_register_script('utthehill-utk', get_template_directory_uri() . '/library/js/min/utk-min.js', array('jquery'), '2015-05-20', true);
    // Setup some vars to pass to js
    $tempDirectory = get_template_directory_uri();
    global $blog_id;
    $siteId = $blog_id;
    $contentArray = generateJson();
    $translation_array = array('templateDirectory' => $tempDirectory, 'siteId' => $siteId, 'contentArray' => $contentArray);
    wp_localize_script('utthehill-utk', 'url_object', $translation_array);
    // run it Lola
    wp_enqueue_script('utthehill-utk');
    // Loads our main stylesheet.
    wp_enqueue_style('utthehill-style', get_stylesheet_uri(), array(), '2015-05-20');
    // Loads the Internet Explorer specific stylesheet.
    wp_enqueue_style('utthehill-ie', get_template_directory_uri() . '/library/css/ie.css', array('utthehill-style'), '2015-05-20');
    wp_style_add_data('utthehill-ie', 'conditional', 'lt IE 9');
}
开发者ID:ahsquared,项目名称:arc,代码行数:41,代码来源:scripts.php


示例12: jetpack_scripts

 /**
  * Enqueue jetpack styles.
  * @since  1.6.1
  */
 public function jetpack_scripts()
 {
     global $storefront_version;
     if (class_exists('Jetpack')) {
         wp_enqueue_style('storefront-jetpack-style', get_template_directory_uri() . '/inc/jetpack/css/jetpack.css', '', $storefront_version);
         wp_style_add_data('storefront-jetpack-style', 'rtl', 'replace');
     }
 }
开发者ID:madebyaris,项目名称:storefront,代码行数:12,代码来源:class-storefront-jetpack.php


示例13: profile_scripts

 function profile_scripts()
 {
     wp_enqueue_script('post-by-email', plugins_url('post-by-email/post-by-email.js', __FILE__), array('jquery'));
     wp_enqueue_style('post-by-email', plugins_url('post-by-email/post-by-email.css', __FILE__));
     wp_style_add_data('post-by-email', 'jetpack-inline', true);
     // Do we really need `admin_styles`? With the new admin UI, it's breaking some bits.
     // Jetpack::init()->admin_styles();
 }
开发者ID:jfbelisle,项目名称:magexpress,代码行数:8,代码来源:post-by-email.php


示例14: afia_enqueue_scripts

/**
 * Enqueue scripts and styles.
 */
function afia_enqueue_scripts()
{
    wp_enqueue_style('genericon', get_template_directory_uri() . '/assets/css/font-awesome.min.css');
    wp_enqueue_style('style', get_stylesheet_uri(), array(), false, 'all');
    wp_enqueue_style('handheld', get_template_directory_uri() . '/assets/css/handheld.css', array(), false, 'all and (max-device-width:768px)');
    wp_enqueue_script('ie_html5shiv', get_template_directory_uri() . '/lib/js/html5.js');
    wp_style_add_data('ie_html5shiv', 'conditional', 'lt IE 9');
}
开发者ID:dominic-n,项目名称:afia,代码行数:11,代码来源:functions.php


示例15: load_css

 /**
  * Load all required CSS files on the front end.
  *
  * Developers can disable our CSS by filtering wp_featherlight_load_css to
  * false within their theme or plugin.
  *
  * @since  0.1.0
  * @access public
  * @return void
  */
 public function load_css()
 {
     if (!apply_filters('wp_featherlight_load_css', true)) {
         return;
     }
     wp_enqueue_style('wp-featherlight', "{$this->url}css/wp-featherlight{$this->suffix}.css", array(), $this->version);
     wp_style_add_data('wp-featherlight', 'rtl', 'replace');
     wp_style_add_data('wp-featherlight', 'suffix', $this->suffix);
 }
开发者ID:primozcigler,项目名称:wp-featherlight,代码行数:19,代码来源:class-scripts.php


示例16: cj_ferret_scripts

/**
 * Enqueue scripts and styles.
 */
function cj_ferret_scripts()
{
    wp_enqueue_style('genericon', get_template_directory_uri() . '/lib/font/genericicon/genericons/genericons.css');
    wp_enqueue_style('style', get_stylesheet_uri(), array(), false, 'all');
    wp_enqueue_style('handheld', get_template_directory_uri() . '/lib/css/less-min.css', array(), false, 'all and (max-device-width:768px)');
    wp_enqueue_script('functions', get_template_directory_uri() . '/lib/js/functions.js', array('jquery'), '', true);
    wp_enqueue_script('ie_html5shiv', get_template_directory_uri() . '/lib/js/shiv-comp.js');
    wp_style_add_data('ie_html5shiv', 'conditional', 'lt IE 9');
}
开发者ID:dominic-n,项目名称:ferret,代码行数:12,代码来源:functions.php


示例17: profile_scripts

 function profile_scripts()
 {
     wp_enqueue_script('post-by-email', plugins_url('post-by-email/post-by-email.js', __FILE__), array('jquery'));
     wp_localize_script('post-by-email', 'pbeVars', array('nonces' => array('enable' => wp_create_nonce('jetpack.createPostByEmailAddress'), 'regenerate' => wp_create_nonce('jetpack.regeneratePostByEmailAddress'), 'disable' => wp_create_nonce('jetpack.deletePostByEmailAddress'))));
     wp_enqueue_style('post-by-email', plugins_url('post-by-email/post-by-email.css', __FILE__));
     wp_style_add_data('post-by-email', 'jetpack-inline', true);
     // Do we really need `admin_styles`? With the new admin UI, it's breaking some bits.
     // Jetpack::init()->admin_styles();
 }
开发者ID:elliott-stocks,项目名称:jetpack,代码行数:9,代码来源:post-by-email.php


示例18: name_me_scripts_styles

/**
 * Enqueues scripts and styles for front end.
 * ============================================================================ 
 */
function name_me_scripts_styles()
{
    global $wp_styles;
    // Loads our site styles (Generated with SASS)
    wp_enqueue_style('name_me_main_style', get_stylesheet_uri());
    // Loads the Internet Explorer specific stylesheets. (Generated with SASS)
    wp_enqueue_style('name_me_ie8', get_template_directory_uri() . '/css/ie.css', array('name_me_main_style'));
    wp_style_add_data('name_me_ie8', 'conditional', 'lt IE 9');
}
开发者ID:habitinc,项目名称:wpsasstheme,代码行数:13,代码来源:functions.php


示例19: storefront_woocommerce_scripts

/**
 * WooCommerce specific scripts & stylesheets
 * @since 1.0.0
 */
function storefront_woocommerce_scripts()
{
    global $storefront_version;
    wp_enqueue_style('storefront-woocommerce-style', get_template_directory_uri() . '/inc/woocommerce/css/woocommerce.css', $storefront_version);
    wp_style_add_data('storefront-woocommerce-style', 'rtl', 'replace');
    wp_register_script('storefront-sticky-payment', get_template_directory_uri() . '/js/checkout.min.js', 'jquery', $storefront_version, true);
    if (is_checkout()) {
        wp_enqueue_script('storefront-sticky-payment');
    }
}
开发者ID:kn0wbody,项目名称:homeboyadvance_storefront,代码行数:14,代码来源:functions.php


示例20: qldgovt_enqueue_scripts

 /**
  * Enqueue our scripts and CSS.
  */
 function qldgovt_enqueue_scripts()
 {
     $suffix = SCRIPT_DEBUG ? '' : '.min';
     wp_enqueue_style('main', get_stylesheet_uri());
     wp_enqueue_script('qg', get_template_directory_uri() . "/assets/js/qg{$suffix}.js", array('jquery'), '1.0', true);
     wp_enqueue_style('ie-stylesheet', get_template_directory_uri() . "/assets/css/qg-ie{$suffix}.css", array());
     wp_style_add_data('ie-stylesheet', 'conditional', 'lt IE 8');
     wp_enqueue_script('ie-layout', get_template_directory_uri() . "/assets/js/ie-layout{$suffix}.js", array('jquery'));
     wp_script_add_data('ie-layout', 'conditional', 'lt IE 9');
 }
开发者ID:humanmade,项目名称:Queensland-Government-Theme,代码行数:13,代码来源:functions.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wp_style_is函数代码示例发布时间:2022-05-23
下一篇:
PHP wp_strip_all_tags函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap