本文整理汇总了PHP中wp_deregister_script函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_deregister_script函数的具体用法?PHP wp_deregister_script怎么用?PHP wp_deregister_script使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_deregister_script函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: montkailash_scripts
/**
* Enqueue scripts and styles.
*
* @since Twenty Fifteen 1.0
*/
function montkailash_scripts()
{
// Load our main stylesheet.
wp_enqueue_style('bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css');
wp_enqueue_style('bootstrap-style', get_template_directory_uri() . '/css/bootstrap-theme.min.css');
wp_enqueue_style('lightbox-style', get_template_directory_uri() . '/css/lightbox.css');
wp_enqueue_style('montkailash-style', get_stylesheet_uri());
if (is_page('Contact')) {
wp_register_script('gmap', "http://maps.google.com/maps/api/js?sensor=true", '', '', true);
wp_enqueue_script('gmap');
wp_enqueue_script('gmaps', get_template_directory_uri() . '/js/gmaps.js', array('jquery'), '', true);
wp_enqueue_script('function-map', get_template_directory_uri() . '/js/function_map.js', array('jquery'), '0.1', true);
}
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', "http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js", '', '1.8.3', true);
wp_enqueue_script('jquery');
wp_deregister_script('wonderplugin-slider-skins-script');
wp_deregister_script('wonderplugin-slider-script');
wp_deregister_script('wonderplugin-slider-creator-script');
wp_deregister_script('woo-vou-public-script');
wp_register_script('wonderplugin-slider-skins-script', plugins_url() . '/wonderplugin-slider/engine/wonderpluginsliderskins.js', array('jquery'), '4.9', true);
wp_register_script('wonderplugin-slider-script', plugins_url() . '/wonderplugin-slider/engine/wonderpluginslider.js', array('jquery'), '4.9', true);
wp_register_script('wonderplugin-slider-creator-script', plugins_url() . '/wonderplugin-slider/app/wonderplugin-slider-creator.js', array('jquery'), '4.9', true);
wp_register_script('woo-vou-public-script', plugins_url() . '/woocommerce-pdf-vouchers/includes/js/woo-vou-public.js', array('jquery'), '2.4.4', true);
wp_enqueue_script('bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '20150330', true);
wp_enqueue_script('lightbox', get_template_directory_uri() . '/js/lightbox.js', array('jquery'), '2.8.1', true);
wp_enqueue_script('montkailash-script', get_template_directory_uri() . '/js/functions.js', array('jquery'), '0.1', true);
}
}
开发者ID:flasomm,项目名称:Montkailash,代码行数:35,代码来源:functions.php
示例2: check_for_multiple_google_maps_api_calls
/**
* Load Google Maps API
*
* Determine if Google Maps API script has already been loaded
* @since : 1.0.3
* @return bool $multiple_google_maps_api
*/
public function check_for_multiple_google_maps_api_calls()
{
global $wp_scripts;
if (!$wp_scripts) {
return false;
}
//loop through registered scripts
foreach ($wp_scripts->registered as $registered_script) {
//find any that have the google script as the source, ensure it's not enqueud by this plugin
if (strpos($registered_script->src, 'maps.googleapis.com/maps/api/js') !== false && strpos($registered_script->handle, 'google-maps-builder') === false || strpos($registered_script->src, 'maps.google.com/maps/api/js') !== false && strpos($registered_script->handle, 'google-maps-builder') === false) {
//Remove this script from loading
wp_deregister_script($registered_script->handle);
wp_dequeue_script($registered_script->handle);
$this->google_maps_conflict = true;
//ensure we can detect scripts on the frontend from backend; we'll use an option to do this
if (!is_admin()) {
update_option('gmb_google_maps_conflict', true);
}
}
}
//Ensure that if user resolved conflict on frontend we remove the option flag
if ($this->google_maps_conflict === false && !is_admin()) {
update_option('gmb_google_maps_conflict', false);
}
}
开发者ID:WordImpress,项目名称:maps-builder-core,代码行数:32,代码来源:class-gmc-scripts.php
示例3: core_mods
function core_mods() {
if ( !is_admin() ) {
wp_deregister_script('jquery');
wp_register_script('jquery', ("//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"), false);
wp_enqueue_script('jquery');
}
}
开发者ID:neufuture,项目名称:HTML5-Reset-Wordpress-Theme,代码行数:7,代码来源:functions.php
示例4: takeaway_register_woo_radio_button_scripts
function takeaway_register_woo_radio_button_scripts()
{
wp_deregister_script('wc-add-to-cart-variation');
wp_dequeue_script('wc-add-to-cart-variation');
wp_register_script('takeaway-add-to-cart-variation', UOU_JS . 'add-to-cart-variation.min.js', array('jquery'), $ver = false, true);
wp_enqueue_script('takeaway-add-to-cart-variation');
}
开发者ID:ankitparsanaa,项目名称:foodapp,代码行数:7,代码来源:script.php
示例5: foundationpress_scripts
function foundationpress_scripts()
{
// Enqueue Main Stylesheet
wp_enqueue_style('Main Stylesheet', get_stylesheet_directory_uri() . '/css/foundation.css');
// Deregister the jquery version bundled with wordpress
wp_deregister_script('jquery');
// Modernizr is used for polyfills and feature detection. Must be placed in header. (Not required)
wp_register_script('modernizr', get_template_directory_uri() . '/js/vendor/modernizr.js', array(), '2.8.3', false);
// Fastclick removes the 300ms delay on click events in mobile environments. Must be placed in header. (Not required)
wp_register_script('fastclick', get_template_directory_uri() . '/js/vendor/fastclick.js', array(), '1.0.0', false);
// CDN hosted jQuery placed in the header, as some plugins require that jQuery is loaded in the header.
wp_enqueue_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js', array(), '2.1.0', false);
// Self hosted jQuery placed in the footer. (Comment the script above and uncomment the script below if you want to switch).
//wp_register_script( 'jquery', get_template_directory_uri() . '/js/vendor/jquery.js', array(), '2.1.3', true );
// If you'd like to cherry-pick the foundation components you need in your project, head over to Gruntfile.js and see lines 67-88
// It's a good idea to do this, performance-wise. No need to load everything if you're just going to use the grid anyway, you know :)
wp_register_script('foundation', get_template_directory_uri() . '/js/foundation.js', array('jquery'), '5.5.1', true);
wp_register_script('troispointszero', get_template_directory_uri() . '/js/custom/troispointzero.js', array('jquery'), '1.0');
// Enqueue all registered scripts
wp_enqueue_script('modernizr');
wp_enqueue_script('fastclick');
wp_enqueue_script('jquery');
wp_enqueue_script('foundation');
wp_enqueue_script('troispointszero');
}
开发者ID:alexandrethiebaut,项目名称:ntsc,代码行数:25,代码来源:enqueue-scripts.php
示例6: site_scripts
function site_scripts()
{
global $wp_styles;
// Call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
// Removes WP version of jQuery
wp_deregister_script('jquery');
// Load jQuery files in header - load in header to avoid issues with plugins
wp_enqueue_script('jquery', get_template_directory_uri() . '/vendor/jquery/dist/jquery.min.js', array(), '', true);
// Load What-Input files in footer
wp_enqueue_script('what-input', get_template_directory_uri() . '/vendor/what-input/what-input.min.js', array(), '', true);
// Adding Foundation scripts file in the footer
wp_enqueue_script('foundation-js', get_template_directory_uri() . '/assets/js/foundation.min.js', array('jquery'), '6.0', true);
// Adding scripts file in the footer
wp_enqueue_script('site-js', get_template_directory_uri() . '/assets/js/scripts.js', array('jquery'), '', true);
// Register main stylesheet
wp_enqueue_style('site-css', get_template_directory_uri() . '/assets/css/style.min.css', array(), '', 'all');
// Register custom stylesheet
wp_enqueue_style('dragoncove-css', get_template_directory_uri() . '/assets/css/dragoncove-style.css', array(), '', 'all');
// Register custom stylesheet
wp_enqueue_style('dragoncove-woocommerce-css', get_template_directory_uri() . '/assets/css/dragoncove-woocommerce.css', array(), '', 'all');
// Comment reply script for threaded comments
if (is_singular() and comments_open() and get_option('thread_comments') == 1) {
wp_enqueue_script('comment-reply');
}
}
开发者ID:KadenLag,项目名称:dragon_cove_base,代码行数:25,代码来源:enqueue-scripts.php
示例7: alfath_scripts
/**
* Enqueue scripts and stylesheets
*
* Enqueue stylesheets in the following order:
* 1. /theme/assets/css/main.min.css
*
* Enqueue scripts in the following order:
* 1. jquery-1.11.0.min.js via Google CDN
* 2. /theme/assets/js/vendor/modernizr-2.7.2.min.js
* 3. /theme/assets/js/main.min.js (in footer)
*/
function alfath_scripts()
{
wp_enqueue_style('alfath_main', get_template_directory_uri() . '/assets/css/main.min.css', false, '1.0.0');
wp_enqueue_style('alfath_fa-icon', get_template_directory_uri() . '/assets/css/font-awesome.min.css', false, '4.0.3');
wp_enqueue_style('alfath-icon', get_template_directory_uri() . '/assets/css/alfath-icon.min.css', false, '1.0.0');
if (file_exists(get_template_directory() . '/assets/css/custom.css')) {
wp_enqueue_style('alfath_custom', get_template_directory_uri() . '/assets/css/custom.css', array('alfath_main'), filemtime(get_template_directory() . '/assets/css/custom.css'), 'all');
}
// jQuery is loaded using the same method from HTML5 Boilerplate:
// Grab Google CDN's latest jQuery with a protocol relative URL; fallback to local if offline
// It's kept in the header instead of footer to avoid conflicts with plugins.
if (!is_admin() && current_theme_supports('jquery-cdn')) {
wp_deregister_script('jquery');
wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js', false, null, false);
add_filter('script_loader_src', 'alfath_jquery_local_fallback', 10, 2);
}
if (is_single() && comments_open() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
wp_register_script('modernizr', get_template_directory_uri() . '/assets/js/vendor/modernizr-2.7.2.min.js', false, null, false);
wp_register_script('jquery-migrate', get_template_directory_uri() . '/assets/js/vendor/jquery-migrate-1.2.1.min.js', array('jquery'), null, false);
wp_register_script('alfath_scripts', get_template_directory_uri() . '/assets/js/scripts.min.js', false, '1.0.0', true);
wp_enqueue_script('modernizr');
wp_enqueue_script('jquery');
wp_enqueue_script('jquery-migrate');
wp_enqueue_script('alfath_scripts');
}
开发者ID:ArgiaCyber,项目名称:alfath,代码行数:38,代码来源:scripts.php
示例8: disable_autosave
function disable_autosave()
{
global $post;
if (get_post_type($post->ID) === 'newsletter') {
wp_deregister_script('autosave');
}
}
开发者ID:bulini,项目名称:sendit,代码行数:7,代码来源:extensions-handler.php
示例9: joints_scripts_and_styles
function joints_scripts_and_styles()
{
global $wp_styles;
// Call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
if (!is_admin()) {
$theme_version = wp_get_theme()->Version;
// Removes WP version of jQuery
wp_deregister_script('jquery');
// Loads jQuery from bower_components
wp_enqueue_script('jquery', get_template_directory_uri() . '/bower_components/foundation/js/vendor/jquery.js', array(), '2.1.3', true);
// Modernizr from bower_components
wp_enqueue_script('modernizr', get_template_directory_uri() . '/bower_components/foundation/js/vendor/modernizr.js', array(), '2.8.3', true);
// Adding Foundation scripts file in the footer
wp_enqueue_script('foundation-js', get_template_directory_uri() . '/assets/js/min/foundation.min.js', array('jquery'), '', true);
// Adding scripts file in the footer
wp_enqueue_script('site-js', get_template_directory_uri() . '/assets/js/min/scripts.min.js', array('jquery'), '', true);
// Register main stylesheet
wp_enqueue_style('site-css', get_template_directory_uri() . '/assets/css/style.css', array(), '', 'all');
// Register foundation icons
// wp_enqueue_style( 'foundation-icons', get_template_directory_uri() . '/assets/css/icons/foundation-icons.css', array(), '3.0', 'all' );
// Comment reply script for threaded comments
if (is_singular() and comments_open() and get_option('thread_comments') == 1) {
wp_enqueue_script('comment-reply');
}
}
}
开发者ID:AJayHubs,项目名称:JointsWP,代码行数:26,代码来源:enqueue-scripts.php
示例10: januas_enqueue_scripts
function januas_enqueue_scripts()
{
wp_deregister_script('jquery');
wp_register_script('jquery', get_stylesheet_directory_uri() . '/lib/scripts/jquery-1.8.3.js');
wp_register_script('jquery-ui', get_stylesheet_directory_uri() . '/lib/scripts/jquery-ui-1.9.2.custom.min.js');
wp_register_style('januas-ie-only', get_stylesheet_directory_uri() . '/lib/styles/ie.css', array(), '');
wp_enqueue_script('januas-modernizr', get_stylesheet_directory_uri() . '/lib/scripts/modernizr.custom.min.js', array(), '2.5.3', false);
wp_enqueue_script('januas-chosen', get_stylesheet_directory_uri() . '/lib/scripts/chosen.jquery.min.js', array('jquery'));
wp_enqueue_script('januas-watermark', get_stylesheet_directory_uri() . '/lib/scripts/jquery.watermark.min.js', array('jquery'));
wp_register_script('januas-bx-jquery', get_stylesheet_directory_uri() . '/lib/scripts/jquery.bxslider.min.js');
wp_enqueue_style('januas-bx-style', get_stylesheet_directory_uri() . '/lib/styles/jquery.bxslider.css');
wp_enqueue_style('januas-fontawesome', get_template_directory_uri() . '/lib/styles/font-awesome.min.css');
wp_enqueue_style('januas-bx-custom', get_stylesheet_directory_uri() . '/lib/styles/bx.custom.css');
wp_enqueue_style('januas-chosen-style', get_stylesheet_directory_uri() . '/lib/styles/chosen.css');
wp_enqueue_style('januas-ie-only');
wp_enqueue_script('januas-bx-jquery');
if (is_singular() && comments_open() && get_option('thread_comments') == 1) {
wp_enqueue_script('comment-reply');
}
if (is_singular('ja-event')) {
wp_enqueue_script('januas-google-maps', 'https://maps.google.com/maps/api/js?sensor=false');
global $post;
if (get_post_meta($post->ID, 'januas_map_visible', true) == 'y') {
wp_enqueue_script('januas-event-map', get_stylesheet_directory_uri() . '/lib/scripts/januas-event-map.js', false, true);
}
wp_enqueue_script('januas-lightbox', get_stylesheet_directory_uri() . '/lib/scripts/jquery.lightbox-0.5.min.js', array('jquery'));
wp_enqueue_style('januas-lightbox', get_stylesheet_directory_uri() . '/lib/styles/jquery.lightbox-0.5.css');
}
wp_enqueue_script('januas-woocommerce', get_template_directory_uri() . '/lib/scripts/woocommerce.js', array('jquery'), false, false);
}
开发者ID:digideskio,项目名称:stammtisch,代码行数:30,代码来源:januas.php
示例11: kadence_scripts
/**
* Enqueue scripts and stylesheets
*
* Enqueue stylesheets in the following order:
* 1. /theme/assets/css/bootstrap.css
* 2. /theme/assets/css/bootstrap-responsive.css
* 3. /theme/assets/css/virtue.css
* 4. /theme/assets/css/skin.css
*
* Enqueue scripts in the following order:
* 1. jquery-1.9.1.min.js via Google CDN
* 2. /theme/assets/js/vendor/modernizr-2.6.2.min.js
* 3. /theme/assets/js/plugins.js (in footer)
* 4. /theme/assets/js/main.js (in footer)
*/
function kadence_scripts()
{
wp_enqueue_style('kadence_bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.css', false, "204");
wp_enqueue_style('kadence_theme', get_template_directory_uri() . '/assets/css/virtue.css', false, "204");
global $virtue;
if (isset($virtue['skin_stylesheet'])) {
$skin = $virtue['skin_stylesheet'];
} else {
$skin = 'default.css';
}
wp_enqueue_style('virtue_skin', get_template_directory_uri() . '/assets/css/skins/' . $skin . '', false, null);
if (is_child_theme()) {
wp_enqueue_style('roots_child', get_stylesheet_uri(), false, null);
}
if (is_single() && comments_open() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
wp_register_script('modernizr', get_template_directory_uri() . '/assets/js/vendor/modernizr-2.6.2.min.js', false, null, false);
wp_register_script('kadence_plugins', get_template_directory_uri() . '/assets/js/plugins.js', false, '200', true);
wp_register_script('kadence_main', get_template_directory_uri() . '/assets/js/main.js', false, null, true);
wp_enqueue_script('jquery');
wp_enqueue_script('modernizr');
wp_enqueue_script('kadence_plugins');
wp_enqueue_script('kadence_main');
if (class_exists('woocommerce')) {
wp_deregister_script('wc-add-to-cart-variation');
wp_register_script('wc-add-to-cart-variation', get_template_directory_uri() . '/assets/js/add-to-cart-variation-ck.js', array('jquery'), false, '200', true);
wp_localize_script('wc-add-to-cart-variation', 'wc_add_to_cart_variation_params', apply_filters('wc_add_to_cart_variation_params', array('i18n_no_matching_variations_text' => esc_attr__('Sorry, no products matched your selection. Please choose a different combination.', 'woocommerce'), 'i18n_unavailable_text' => esc_attr__('Sorry, this product is unavailable. Please choose a different combination.', 'woocommerce'))));
wp_enqueue_script('wc-add-to-cart-variation');
}
}
开发者ID:Joaquinsemp,项目名称:patriestausado,代码行数:46,代码来源:scripts.php
示例12: scripts
/**
* Load scripts
*
* @since 1.6.0
*/
public function scripts($hook)
{
if (WPEX_ADMIN_PANEL_HOOK_PREFIX . '-custom-js' == $hook) {
wp_deregister_script('ace-editor');
wp_enqueue_script('wpex-ace-editor', WPEX_FRAMEWORK_DIR_URI . 'addons/assets/ace.js', array(), true);
}
}
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:12,代码来源:custom-js.php
示例13: enqueue_scripts
public function enqueue_scripts()
{
parent::enqueue_scripts();
wp_deregister_script('cmb-google-maps-script');
wp_enqueue_script('cmb-google-maps-script', trailingslashit(WP_TALENTS_URL) . 'js/field-gmap.js', array('jquery', 'cmb-google-maps'));
wp_localize_script('cmb-google-maps-script', 'CMBGmaps', array('defaults' => array('latitude' => $this->args['default_lat'], 'longitude' => $this->args['default_long'], 'zoom' => $this->args['default_zoom']), 'strings' => array('markerTitle' => $this->args['string-marker-title'])));
}
开发者ID:Steadroy,项目名称:wptalents,代码行数:7,代码来源:Gmap_Field.php
示例14: roots_scripts
/**
* Scripts and stylesheets
*
* Enqueue stylesheets in the following order:
* 1. /theme/assets/css/main.css
*
* Enqueue scripts in the following order:
* 1. jquery-1.11.1.min.js via Google CDN
* 2. /theme/assets/js/vendor/modernizr.min.js
* 3. /theme/assets/js/scripts.js
*
* Google Analytics is loaded after enqueued scripts if:
* - An ID has been defined in config.php
* - You're not logged in as an administrator
*/
function roots_scripts()
{
/**
* The build task in Grunt renames production assets with a hash
* Read the asset names from assets-manifest.json
*/
wp_enqueue_style('google_fonts', 'https://fonts.googleapis.com/css?family=Oswald:400,700', false, null);
wp_enqueue_style('font_awesome', '//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css', false, '90912b55a3d6b2070ca68c801a5ef6bb');
if (WP_ENV === 'development') {
$assets = array('css' => '/assets/css/main.css', 'js' => '/assets/js/scripts.js', 'modernizr' => '/assets/vendor/modernizr/modernizr.js', 'jquery' => '//code.jquery.com/jquery-1.11.1.min.js', 'owl_carousel' => '/assets/js/plugins/owl.carousel.js');
} else {
$get_assets = file_get_contents(get_template_directory() . '/assets/manifest.json');
$assets = json_decode($get_assets, true);
$assets = array('css' => '/assets/css/main.min.css?' . $assets['assets/css/main.min.css']['hash'], 'js' => '/assets/js/scripts.min.js?' . $assets['assets/js/scripts.min.js']['hash'], 'modernizr' => '/assets/js/vendor/modernizr.min.js', 'jquery' => '//code.jquery.com/jquery-1.11.1.min.js', 'owl_carousel' => '/assets/js/plugins/owl.carousel.js');
}
wp_enqueue_style('roots_css', get_template_directory_uri() . $assets['css'], false, null);
/**
* jQuery is loaded using the same method from HTML5 Boilerplate:
* Grab Google CDN's latest jQuery with a protocol relative URL; fallback to local if offline
* It's kept in the header instead of footer to avoid conflicts with plugins.
*/
if (!is_admin() && current_theme_supports('jquery-cdn')) {
wp_deregister_script('jquery');
wp_register_script('jquery', $assets['jquery'], array(), null, false);
add_filter('script_loader_src', 'roots_jquery_local_fallback', 10, 2);
}
if (is_single() && comments_open() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
wp_enqueue_script('modernizr', get_template_directory_uri() . $assets['modernizr'], array(), null, false);
wp_enqueue_script('jquery');
wp_enqueue_script('roots_js', get_template_directory_uri() . $assets['js'], array(), null, false);
}
开发者ID:ronksc,项目名称:omega,代码行数:48,代码来源:scripts.php
示例15: remove_useless_scripts
function remove_useless_scripts()
{
// slideshow gallery lightbox is disabled via admin
wp_deregister_script('jquery-flightbox');
wp_deregister_script('jquery-flightbox-css');
wp_deregister_script('flickr-gallery');
}
开发者ID:htmlgraphic,项目名称:Remodeling-Appleton,代码行数:7,代码来源:functions.php
示例16: enqueue_admin_scripts
/**
* Settings scripts
*/
public function enqueue_admin_scripts()
{
// deregister scripts
wp_deregister_script('underscore');
wp_deregister_script('select2');
wp_deregister_script('backbone');
// register
$external_libs = WC_POS_Template::get_external_js_libraries();
wp_register_script('underscore', $external_libs['lodash'], array('jquery'), null, true);
wp_register_script('backbone', $external_libs['backbone'], array('jquery', 'underscore'), null, true);
wp_register_script('backbone.radio', $external_libs['radio'], array('jquery', 'backbone', 'underscore'), null, true);
wp_register_script('marionette', $external_libs['marionette'], array('jquery', 'backbone', 'underscore'), null, true);
wp_register_script('handlebars', $external_libs['handlebars'], false, null, true);
wp_register_script('moment', $external_libs['moment'], false, null, true);
wp_register_script('accounting', $external_libs['accounting'], false, null, true);
wp_register_script('select2', 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.min.js', array('jquery'), null, true);
wp_register_script('idb-wrapper', $external_libs['idb-wrapper'], false, null, true);
// enqueue
wp_enqueue_script('jquery-ui-sortable');
$build = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? 'build' : 'min';
wp_enqueue_script(WC_POS_PLUGIN_NAME . '-admin-app', WC_POS_PLUGIN_URL . 'assets/js/admin.' . $build . '.js', array('backbone', 'backbone.radio', 'marionette', 'handlebars', 'accounting', 'moment', 'select2', 'idb-wrapper'), WC_POS_VERSION, true);
wp_enqueue_script('eventsource-polyfill', WC_POS_PLUGIN_URL . 'assets/js/vendor/eventsource.min.js', array(), null, true);
$scripts = apply_filters('woocommerce_pos_admin_enqueue_scripts', array());
if (isset($scripts['locale'])) {
wp_enqueue_script(WC_POS_PLUGIN_NAME . '-js-locale', $scripts['locale'], array(WC_POS_PLUGIN_NAME . '-admin-app'), WC_POS_VERSION, true);
}
}
开发者ID:rpidanny,项目名称:WooCommerce-POS,代码行数:30,代码来源:class-wc-pos-settings.php
示例17: ncsu_theme_scripts
function ncsu_theme_scripts()
{
// Deregister the included library
wp_deregister_script('jquery');
// Register jQuery again from Google's CDN
wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js', array(), null, true);
wp_register_script('ncsu-bootstrap', 'https://cdn.ncsu.edu/brand-assets/bootstrap/js/bootstrap.min.js', array('jquery'), null, true);
wp_enqueue_script('ncsu-bootstrap');
/**
* Uncomment to enqueue individual scripts (development)
*
*/
/*
wp_register_script('theme-main-js', get_template_directory_uri() . '/js/main.js', array('jquery'), null, true);
wp_enqueue_script('theme-main-js');
wp_register_script('wp-mobile-nav', get_template_directory_uri() . '/js/ncstate-mobile-nav.js', array('jquery'), null, true);
wp_enqueue_script('wp-mobile-nav');
wp_register_script('picture-fill', get_template_directory_uri(). '/js/picturefill.min.js');
wp_enqueue_script('picture-fill');
*/
/**
* Use minified js in production environments -
* Uncomment the lines below if using non-minified scripts
*
*/
wp_register_script('minified-js', get_template_directory_uri() . '/js/main.min.js', array('jquery'), null, true);
wp_enqueue_script('minified-js');
}
开发者ID:allencoin,项目名称:wordpress-template,代码行数:30,代码来源:functions.php
示例18: 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
示例19: bones_head_cleanup
function bones_head_cleanup()
{
// remove header links
remove_action('wp_head', 'feed_links_extra', 3);
// Category Feeds
remove_action('wp_head', 'feed_links', 2);
// Post and Comment Feeds
remove_action('wp_head', 'rsd_link');
// EditURI link
remove_action('wp_head', 'wlwmanifest_link');
// Windows Live Writer
remove_action('wp_head', 'index_rel_link');
// index link
remove_action('wp_head', 'parent_post_rel_link', 10, 0);
// previous link
remove_action('wp_head', 'start_post_rel_link', 10, 0);
// start link
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
// Links for Adjacent Posts
remove_action('wp_head', 'wp_generator');
// WP version
if (!is_admin()) {
wp_deregister_script('jquery');
// De-Register jQuery
wp_register_script('jquery', '', '', '', true);
// It's already in the Header
}
}
开发者ID:Triplelexx,项目名称:hifi-web,代码行数:28,代码来源:bones.php
示例20: remove_scripts
function remove_scripts()
{
wp_deregister_script('selection-sharer');
wp_deregister_script('flexslider');
wp_deregister_script('magnific-popup');
wp_deregister_script('mediaelement');
wp_deregister_script('fitvids');
wp_deregister_script('validate');
wp_deregister_script('share');
wp_deregister_script('socialstream');
wp_deregister_script('r-gallery');
wp_deregister_script('isotope');
wp_deregister_script('prettify');
wp_deregister_style('selection-sharer');
wp_deregister_style('flexslider');
wp_deregister_style('magnific-popup');
wp_deregister_style('mediaelement');
wp_deregister_style('elastislide');
wp_deregister_style('prettify');
wp_deregister_style('fontello');
wp_deregister_style('bootstrap');
wp_deregister_style('uniform');
wp_deregister_style('main');
wp_deregister_style('768');
wp_deregister_style('992');
wp_deregister_style('1200');
wp_deregister_style('1400');
wp_deregister_style('wp-fix');
// upgrade fluidbox
wp_deregister_style('fluidbox');
wp_deregister_script('fluidbox');
wp_enqueue_script('throttle-debounce', '/wp-content/themes/collinmbarrett/jquery.ba-throttle-debounce.min.js', null, null, true);
wp_enqueue_script('fluidbox2', '/wp-content/themes/collinmbarrett/jquery.fluidbox.min.js', null, null, true);
}
开发者ID:collinbarrett,项目名称:collinmbarrett,代码行数:34,代码来源:functions.php
注:本文中的wp_deregister_script函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论