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

PHP wp_script_add_data函数代码示例

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

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



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

示例1: twbsg_ie_fix

function twbsg_ie_fix()
{
    wp_enqueue_script('html5shiv', 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js', array(), false, false);
    wp_enqueue_script('respond', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js', array(), false, false);
    wp_script_add_data('html5shiv', 'conditional', 'lt IE 9');
    wp_script_add_data('respond', 'conditional', 'lt IE 9');
}
开发者ID:Wordpress-Development,项目名称:genesis-bootstrap,代码行数:7,代码来源:head.php


示例2: base_scripts

/** Enqueue scripts and styles */
function base_scripts()
{
    if (!is_admin()) {
        // Enqueue the main Stylesheet
        wp_enqueue_style('main', get_stylesheet_directory_uri() . '/assets/css/application.css', array(), '', 'all');
        // modernizr (from CDN)
        wp_enqueue_script('modernizr', '//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.2/modernizr.min.js', array(), '2.8.2', false);
        // Deregister the jquery version bundled with WordPress.
        // CDN hosted jQuery placed in the header,
        // as some plugins require that jQuery is loaded in the header.
        wp_deregister_script('jquery');
        wp_enqueue_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js', array(), '2.1.0', false);
        // Load the html5 shiv.
        wp_enqueue_script('twentysixteen-html5', get_template_directory_uri() . '/assets/js/html5.js', array(), '3.7.3');
        wp_script_add_data('twentysixteen-html5', 'conditional', 'lt IE 9');
        // Enqueue the main js
        // wp_enqueue_script( 'main', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), '', true );
        //wp_enqueue_script( 'skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
        if (is_singular() && comments_open() && get_option('thread_comments')) {
            wp_enqueue_script('comment-reply');
        }
        // Google Fonts
        // wp_register_style('googleFonts', 'http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic');
        // wp_enqueue_style( 'googleFonts');
    }
}
开发者ID:timbomckay,项目名称:base-theme,代码行数:27,代码来源:enqueue-scripts.php


示例3: 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


示例4: ct_author_load_scripts_styles

function ct_author_load_scripts_styles()
{
    wp_register_style('ct-author-google-fonts', '//fonts.googleapis.com/css?family=Rokkitt:400|Lato:400');
    // main JS file
    wp_enqueue_script('ct-author-js', get_template_directory_uri() . '/js/build/production.min.js', array('jquery'), '', true);
    wp_localize_script('ct-author-js', 'objectL10n', array('openPrimaryMenu' => __('open primary menu', 'author'), 'closePrimaryMenu' => __('close primary menu', 'author'), 'openChildMenu' => __('open child menu', 'author'), 'closeChildMenu' => __('close child menu', 'author')));
    // Google Fonts
    wp_enqueue_style('ct-author-google-fonts');
    // Font Awesome
    wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/font-awesome/css/font-awesome.min.css');
    // load primary stylesheet
    if (is_rtl()) {
        wp_enqueue_style('ct-author-style-rtl', get_template_directory_uri() . '/styles/rtl.min.css');
    } else {
        wp_enqueue_style('ct-author-style', get_stylesheet_uri());
    }
    // enqueue comment-reply script only on posts & pages with comments open ( included in WP core )
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    /* Load Polyfills */
    // HTML5 shiv
    wp_enqueue_script('ct-author-html5-shiv', get_template_directory_uri() . '/js/build/html5shiv.min.js');
    wp_script_add_data('ct-author-html5-shiv', 'conditional', 'IE 8');
    // respond.js - media query support
    wp_enqueue_script('ct-author-respond', get_template_directory_uri() . '/js/build/respond.min.js', '', '', true);
    wp_script_add_data('ct-author-respond', 'conditional', 'IE 8');
}
开发者ID:kimyj9501,项目名称:SingMyStory,代码行数:28,代码来源:scripts.php


示例5: allonsy_wp_enqueue_scripts

/**
 * Queuing up JS and CSS for the front-end. Notes:
 *
 * - Use get_stylesheet_directory_uri() to pull from the parent theme, child themes use get_stylesheet_directory_uri()
 * - Use conditionals to restrict extra JS and CSS to specific templates and pages
 *
 * @see https://codex.wordpress.org/Function_Reference/wp_enqueue_style
 * @see https://codex.wordpress.org/Function_Reference/wp_enqueue_script
 *
 */
function allonsy_wp_enqueue_scripts()
{
    /*
     * Main stylesheet file for all pages, should be final, pre-processed file
     */
    wp_enqueue_style('allonsy-main', get_stylesheet_directory_uri() . '/assets/css/main.css', FALSE, ALLONSY_THEME_VERSION);
    /*
     * Conditionally load HTML5 shim for browsers less than or equal to IE 8
     * Same $wp_scripts->add_data() technique can be used for conditional IE stylesheets
     */
    wp_enqueue_script('allonsy-lte-ie8', get_template_directory_uri() . '/assets/js/vendor/html5shiv.min.js', array(), '3.7.3', FALSE);
    wp_script_add_data('allonsy-lte-ie8', 'conditional', 'lte IE 8');
    /*
     * Main JavaScript file
     * If using Browserify or other pre-processor, this should point to the final, compiled file
     */
    wp_enqueue_script('allonsy-main', get_stylesheet_directory_uri() . '/assets/js/main.js', array('jquery'), ALLONSY_THEME_VERSION, TRUE);
    /**
     * Localize JS file.
     * Creates a global variable that can be used in the smsframe-main JS file.
     * Used for:
     *
     * - Variables only provided in PHP
     * - Translation for any text output in JS
     * - Settings from the Customizer
     *
     * @see https://codex.wordpress.org/Function_Reference/wp_localize_script
     */
    wp_localize_script('allonsy-main', 'allonsyLocalVars', array('ajaxUrl' => admin_url('admin-ajax.php'), 'homeUrl' => home_url(), 'wpDebug' => defined('WP_DEBUG') ? WP_DEBUG : FALSE, 'i18n' => array('unknownError' => __('Something went wrong, pleas refresh the page and try again.', 'allons-y'))));
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
开发者ID:joshcanhelp,项目名称:wp-starter,代码行数:43,代码来源:wp-enqueue.php


示例6: ct_chosen_load_scripts_styles

function ct_chosen_load_scripts_styles()
{
    wp_register_style('ct-chosen-google-fonts', '//fonts.googleapis.com/css?family=Playfair+Display:400|Raleway:400,700,400italic');
    // main JS file
    wp_enqueue_script('ct-chosen-js', get_template_directory_uri() . '/js/build/production.min.js', array('jquery'), '', true);
    wp_localize_script('ct-chosen-js', 'objectL10n', array('openMenu' => __('open menu', 'chosen'), 'closeMenu' => __('close menu', 'chosen'), 'openChildMenu' => __('open dropdown menu', 'chosen'), 'closeChildMenu' => __('close dropdown menu', 'chosen')));
    // Google Fonts
    wp_enqueue_style('ct-chosen-google-fonts');
    // Font Awesome
    wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/font-awesome/css/font-awesome.min.css');
    // Stylesheet
    if (is_rtl()) {
        wp_enqueue_style('ct-chosen-style-rtl', get_template_directory_uri() . '/styles/rtl.min.css');
    } else {
        wp_enqueue_style('ct-chosen-style', get_stylesheet_uri());
    }
    // enqueue comment-reply script only on posts & pages with comments open ( included in WP core )
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    /* Load Polyfills */
    // HTML5 shiv
    wp_enqueue_script('ct-chosen-html5-shiv', get_template_directory_uri() . '/js/build/html5shiv.min.js');
    // respond.js - media query support
    wp_enqueue_script('ct-chosen-respond', get_template_directory_uri() . '/js/build/respond.min.js', '', '', true);
    // prevent fatal error on < WP 4.2 (load files unconditionally instead)
    if (function_exists('wp_script_add_data')) {
        wp_script_add_data('ct-chosen-html5-shiv', 'conditional', 'IE 8');
        wp_script_add_data('ct-chosen-respond', 'conditional', 'IE 8');
    }
}
开发者ID:Edamame88,项目名称:caetla_work,代码行数:31,代码来源:scripts.php


示例7: satu_enqueue

/**
 * Loads the theme styles & scripts.
 *
 * @since 1.0.0
 * @link  http://codex.wordpress.org/Function_Reference/wp_enqueue_script
 * @link  http://codex.wordpress.org/Function_Reference/wp_enqueue_style
 */
function satu_enqueue()
{
    // Add custom fonts, used in the main stylesheet.
    wp_enqueue_style('satu-fonts', satu_fonts_url(), array(), null);
    // if is not a child theme and WP_DEBUG and/or SCRIPT_DEBUG turned on, load the unminified styles & script.
    if (!is_child_theme() && WP_DEBUG || SCRIPT_DEBUG) {
        // Load main stylesheet
        wp_enqueue_style('satu-style', get_stylesheet_uri(), array('dashicons'));
        // Load custom js plugins.
        wp_enqueue_script('satu-plugins', trailingslashit(get_template_directory_uri()) . 'assets/js/plugins.min.js', array('jquery'), null, true);
        // Load custom js methods.
        wp_enqueue_script('satu-main', trailingslashit(get_template_directory_uri()) . 'assets/js/main.js', array('jquery'), null, true);
        // Load js function for responsive navigation.
        wp_enqueue_script('satu-mobile-nav', trailingslashit(get_template_directory_uri()) . 'assets/js/navigation.js', array(), null, true);
    } else {
        // Load main stylesheet
        wp_enqueue_style('satu-style', trailingslashit(get_template_directory_uri()) . 'style.min.css', array('dashicons'));
        // Load custom js plugins.
        wp_enqueue_script('satu-scripts', trailingslashit(get_template_directory_uri()) . 'assets/js/satu.min.js', array('jquery'), null, true);
        // Load js function for responsive navigation.
        wp_enqueue_script('satu-mobile-nav', trailingslashit(get_template_directory_uri()) . 'assets/js/navigation.js', array(), null, true);
    }
    // If child theme is active, load the stylesheet.
    if (is_child_theme()) {
        wp_enqueue_style('satu-child-style', get_stylesheet_uri());
    }
    // Load comment-reply script.
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    // Loads HTML5 Shiv
    wp_enqueue_script('standard-html5', trailingslashit(get_template_directory_uri()) . 'assets/js/html5shiv.min.js', array('jquery'), null, false);
    wp_script_add_data('standard-html5', 'conditional', 'lte IE 9');
}
开发者ID:satrya,项目名称:satu,代码行数:41,代码来源:scripts.php


示例8: selenenw_scripts

/**
 * Enqueue scripts and styles.
 */
function selenenw_scripts()
{
    // Load our main stylesheet.
    wp_enqueue_style('selenenw-style', get_stylesheet_uri());
    // Load supporting stylesheet
    wp_enqueue_style('selenenw-fonts', get_template_directory_uri() . '/css/fonts.css', array(), '20150814');
    wp_enqueue_style('selene-lightslider', get_template_directory_uri() . '/css/lightSlider.min.css', array(), '20150814');
    wp_enqueue_style('selenenw-animate', get_template_directory_uri() . '/css/animate.css', array(), '20150814');
    wp_enqueue_style('selenenw-lightgallery', get_template_directory_uri() . '/css/lightGallery.min.css', array(), '20150814');
    // Load google fonts
    wp_enqueue_style('selenenw-google-font', 'http://fonts.googleapis.com/css?family=Roboto+Slab:300,400,700|Raleway:400,500,600,700&amp;subset=latin,greek,cyrillic,vietnamese');
    // Load the Internet Explorer specific scripts.
    wp_enqueue_script('selenenw-html5shiv', 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js', array('selenenw-style'));
    wp_script_add_data('selenenw-html5shiv', 'conditional', 'lt IE 9');
    wp_enqueue_script('selenenw-respond', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js', array('selenenw-style'));
    wp_script_add_data('selenenw-respond', 'conditional', 'lt IE 9');
    // Load footer scripts
    wp_enqueue_script('selenenw-jetmenu', get_template_directory_uri() . '/js/jetmenu.js', array('jquery', 'jquery-ui-core'), '20150814', true);
    wp_enqueue_script('selenenw-uniform', get_template_directory_uri() . '/js/jquery.uniform.min.js', array('jquery', 'jquery-ui-core'), '20150814', true);
    wp_enqueue_script('selenenw-lightslider', get_template_directory_uri() . '/js/jquery.lightSlider.min.js', array('jquery', 'jquery-ui-core'), '20150814', true);
    wp_enqueue_script('selenenw-wow', get_template_directory_uri() . '/js/wow.min.js', array('jquery', 'jquery-ui-core'), '20150814', true);
    wp_enqueue_script('selenenw-scripts', get_template_directory_uri() . '/js/scripts.js', array('jquery', 'jquery-ui-core', 'jquery-ui-datepicker'), '20150814', true);
    wp_enqueue_script('selenenw-lightgallery', get_template_directory_uri() . '/js/lightGallery.min.js', array('jquery', 'jquery-ui-core', 'jquery-ui-datepicker'), '20150814', true);
    wp_enqueue_script('selenene-custom-js', get_template_directory_uri() . '/js/custom.js', array('jquery'), '20150814', true);
    wp_localize_script('selenene-custom-js', 'selenenw_ajax', array('ajax_url' => admin_url('admin-ajax.php'), 'site_url' => site_url()));
}
开发者ID:shesser,项目名称:selenenw,代码行数:29,代码来源:functions.php


示例9: pigeon_enqueue_scripts

/**
 * JavaScript読み込み
 */
function pigeon_enqueue_scripts()
{
    wp_enqueue_script('jquery');
    wp_enqueue_script('html5shiv', get_template_directory_uri() . '/js/html5shiv.min.js');
    wp_script_add_data('html5shiv', 'conditional', 'lt IE 9');
    wp_enqueue_script('respond', get_template_directory_uri() . '/js/respond.min.js');
}
开发者ID:ko31,项目名称:pigeon,代码行数:10,代码来源:functions.php


示例10: supermag_scripts

/**
 * Enqueue scripts and styles.
 */
function supermag_scripts()
{
    /*bxslider css*/
    wp_enqueue_style('jquery-bxslider', get_template_directory_uri() . '/assets/library/bxslider/css/jquery.bxslider.min.css', array(), '4.2.5');
    /*google font*/
    wp_enqueue_style('supermag-googleapis', '//fonts.googleapis.com/css?family=Oswald:300,400,700|Roboto:300italic,400,500,700', array(), '1.0.1');
    /*Font-Awesome-master*/
    wp_enqueue_style('fontawesome', get_template_directory_uri() . '/assets/library/Font-Awesome/css/font-awesome.min.css', array(), '4.5.0');
    /*main style*/
    wp_enqueue_style('supermag-style', get_stylesheet_uri());
    /*jquery start*/
    /*html5*/
    wp_enqueue_script('html5', get_template_directory_uri() . '/assets/library/html5shiv/html5shiv.min.js', array('jquery'), '3.7.3', false);
    wp_script_add_data('html5', 'conditional', 'lt IE 9');
    /*respond*/
    wp_enqueue_script('respond', get_template_directory_uri() . '/assets/library/respond/respond.min.js', array('jquery'), '1.1.2', false);
    wp_script_add_data('respond', 'conditional', 'lt IE 9');
    /*bxslider*/
    wp_enqueue_script('jquery-bxslider', get_template_directory_uri() . '/assets/library/bxslider/js/jquery.bxslider.min.js', array('jquery'), '4.2.5', 1);
    /*theme custom js*/
    wp_enqueue_script('supermag-custom', get_template_directory_uri() . '/assets/js/supermag-custom.js', array('jquery'), '1.1.3', 1);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
开发者ID:idea-lab,项目名称:Spectrum,代码行数:28,代码来源:core.php


示例11: tkuim_scripts

function tkuim_scripts()
{
    wp_enqueue_style('tkuim-fontawesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', array(), '4.5.0');
    wp_enqueue_style('tkuim-style', get_stylesheet_uri(), array(), '1.0.0');
    wp_enqueue_script('tkuim-html5', get_template_directory_uri() . '/js/html5.js', array(), '3.7.3');
    wp_script_add_data('tkuim-html5', 'conditional', 'lt IE 9');
}
开发者ID:tommy351,项目名称:wp-tkuim,代码行数:7,代码来源:functions.php


示例12: axmagazine_scripts

 function axmagazine_scripts()
 {
     wp_enqueue_style('axmagazine-style', get_stylesheet_uri());
     wp_enqueue_script('axmagazine-html5', 'https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js', array(), '3.7.3');
     wp_script_add_data('axmagazine-html5', 'conditional', 'lt IE 9');
     wp_enqueue_script('axmagazine-jquery', 'http://code.jquery.com/jquery-1.12.0.min.js', array(), false, true);
     wp_enqueue_script('axmagazine-script', get_template_directory_uri() . '/script.js', array(), false, true);
 }
开发者ID:Axel-Charpentier,项目名称:axmagazine,代码行数:8,代码来源:functions.php


示例13: lightning_addJs

function lightning_addJs()
{
    wp_enqueue_script('html5shiv', 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js');
    wp_script_add_data('html5shiv', 'conditional', 'lt IE 9');
    wp_enqueue_script('respond', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js');
    wp_script_add_data('respond', 'conditional', 'lt IE 9');
    wp_enqueue_script('lightning-js', get_template_directory_uri() . '/js/all.min.js', array('jquery'), '20150918a');
}
开发者ID:Dr0na,项目名称:Lightning,代码行数:8,代码来源:functions.php


示例14: 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


示例15: enqueueScripts

 /**
  * Enqueue scripts for stats page only (Flot charting library).
  *
  * @param  string $hook
  * @return void
  */
 public function enqueueScripts($hook)
 {
     if ($hook !== 'optimizepress_page_optimizepress-stats') {
         return;
     }
     wp_enqueue_script('excanvas', OP_JS . 'excanvas.min.js', false, '1.0.0', true);
     wp_script_add_data('excanvas', 'conditional', 'lte IE 8');
     wp_enqueue_script('flot', OP_JS . 'flot/jquery.flot.min.js', array('jquery'), '0.8.3', true);
     wp_enqueue_script('op-flot-init', OP_JS . 'flot/op-flot-init' . OP_SCRIPT_DEBUG . '.js', array('jquery', 'flot'), OP_VERSION, true);
     wp_localize_script('op-flot-init', 'OpStats', array('data' => op_optin_stats_get_chart_formated_data()));
 }
开发者ID:kyscastellanos,项目名称:arepa,代码行数:17,代码来源:stats.php


示例16: boot_gen_move_js_to_footer

function boot_gen_move_js_to_footer()
{
    $scripts = wp_scripts();
    foreach ($scripts->registered as $script) {
        if ('html5shiv' == $script->handle || 'respond' == $script->handle) {
            wp_script_add_data($script->handle, 'group', 0);
        } else {
            wp_script_add_data($script->handle, 'group', 1);
        }
    }
}
开发者ID:Wordpress-Development,项目名称:genesis-bootstrap,代码行数:11,代码来源:scripts-to-footer.php


示例17: load_marquee_scripts

function load_marquee_scripts()
{
    //wp_register_script('jquery', 'http://code.jquery.com/jquery-1.11.0.min.js');
    wp_register_script('ex2_slider_js', get_template_directory_uri() . '/ex2-slider/js/ex2_slider.js', array('jquery'));
    //wp_enqueue_script('jquery');
    wp_enqueue_script('ex2_slider_js');
    // Load the Internet Explorer specific stylesheet.
    wp_enqueue_style('ex2-slider-css', get_template_directory_uri() . "/ex2-slider/css/ex2_slider.css", array("ex2-blank-style"));
    wp_enqueue_style('ex2-slider-ie8', get_template_directory_uri() . "/ex2-slider/css/ex2_slider_ie8.css", array("ex2-slider-css"));
    wp_style_add_data('ex2-slider-ie8', 'conditional', 'lt IE 9');
    wp_register_script('ex2-slider-shiv', "http://html5shiv.googlecode.com/svn/trunk/html5.js", array("ex2_slider_js"));
    wp_enqueue_script('ex2-slider-shiv');
    wp_script_add_data('ex2-slider-shiv', 'conditional', 'lt IE 9');
}
开发者ID:vandalk,项目名称:ex2-theme,代码行数:14,代码来源:ex2_slider_functions_include.php


示例18: blogus_scripts

function blogus_scripts()
{
    //  css
    wp_enqueue_style('blogus-bootstrap-css', get_template_directory_uri() . '/css/bootstrap.min.css');
    wp_enqueue_style('blogus-style', get_stylesheet_uri(), ['blogus-bootstrap-css']);
    //  js
    wp_enqueue_script('blogus-jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', [], false, true);
    wp_enqueue_script('blogus-bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', ['blogus-jquery'], false, true);
    wp_enqueue_script('blogus-ie10', get_template_directory_uri() . '/js/ie10-viewport-bug-workaround.js', ['blogus-bootstrap-js'], false, true);
    wp_enqueue_script('ie9-js', 'https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js');
    wp_script_add_data('ie9-js', 'conditional', 'lt IE 9');
    wp_enqueue_script('ie9-js2', 'https://oss.maxcdn.com/respond/1.4.2/respond.min.js');
    wp_script_add_data('ie9-js2', 'conditional', 'lt IE 9');
}
开发者ID:sbogdanov108,项目名称:article_wp,代码行数:14,代码来源:functions.php


示例19: kodlabb_wp_theme_load_scripts

function kodlabb_wp_theme_load_scripts()
{
    wp_enqueue_script('html5shiv', get_template_directory_uri() . '/js/html5shiv.js');
    wp_script_add_data('html5shiv', 'conditional', 'lt IE 9');
    wp_enqueue_script('respond', get_template_directory_uri() . '/js/respond.min.js');
    wp_script_add_data('respond', 'conditional', 'lt IE 9');
    wp_enqueue_style('bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css');
    wp_enqueue_style('flat-ui', get_template_directory_uri() . '/css/flat-ui.min.css');
    wp_enqueue_style('kodlabb', get_template_directory_uri() . '/css/kodlabb.css');
    wp_enqueue_style('montserrat', 'http://fonts.googleapis.com/css?family=Montserrat:400');
    wp_enqueue_script('jquery-1.11.1', get_template_directory_uri() . '/js/jquery.min.js', array(), null, true);
    wp_enqueue_script('flat-ui', get_template_directory_uri() . '/js/flat-ui.min.js', array(), null, true);
    wp_enqueue_script('application', get_template_directory_uri() . '/js/application.js', array(), null, true);
}
开发者ID:kodlabbskarholmen,项目名称:kodlabb-wp,代码行数:14,代码来源:functions.php


示例20: bombadil_theme_scripts

/**
 * Enqueues Bombadil Scripts
 *
 */
function bombadil_theme_scripts()
{
    wp_enqueue_script('foundation', get_stylesheet_directory_uri() . '/js/foundation.min.js', array('jquery'), '', true);
    wp_enqueue_script('iframe_resizer', get_stylesheet_directory_uri() . '/js/iframe_resizer.js', array('jquery'), '', true);
    wp_enqueue_script('embedded_audio', get_stylesheet_directory_uri() . '/js/audio_behavior.js', array('jquery'), '', true);
    wp_enqueue_script('lti_buttons', get_stylesheet_directory_uri() . '/js/lti_buttons.js', array('jquery'), '', true);
    wp_enqueue_script('attributions', get_stylesheet_directory_uri() . '/js/attributions.js', array('jquery'), '', true);
    // Pass PHP data down to attributions.js
    $dataToBePassed = array('id' => get_the_ID());
    wp_localize_script('attributions', 'thePost', $dataToBePassed);
    wp_enqueue_script('hide_answers', plugins_url('tinymce-hide-answers') . '/js/hide-answers.js', array('jquery'), '', true);
    wp_enqueue_script('html5shiv', 'https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js', array(), '3.7.3', false);
    wp_script_add_data('html5shiv', 'conditional', 'lt IE 9');
    wp_enqueue_script('typekit', '//use.typekit.net/mje6fya.js', array(), '1.0.0');
}
开发者ID:lumenlearning,项目名称:candela-utility,代码行数:19,代码来源:functions.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP wp_script_is函数代码示例发布时间:2022-05-23
下一篇:
PHP wp_schedule_single_event函数代码示例发布时间: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