您好,我正在尝试将在我的队列中找到的脚本“jquery.favorite.js”退出队列。php:
// WP_ENQUEUE_SCRIPTS
static function wp_enqueue_scripts_callback()
{
global $javo_tso;
$javo_register_scripts = Array(
\'oms.min.js\' => \'oms-same-position-script\'
, \'common.js\' => \'javo-common-script\'
, \'chosen.jquery.min.js\' => \'jQuery-chosen-autocomplete\'
, \'jquery.javo.msg.js\' => \'javoThemes-Message-Plugin\'
, \'jquery.parallax.min.js\' => \'jQuery-Parallax\'
, \'jquery.favorite.js\' => \'jQuery-javo-Favorites\'
, \'jquery_javo_search.js\' => \'jQuery-javo-search\'
, \'jquery.flexslider-min.js\' => \'jQuery-flex-Slider\'
, \'google.map.infobubble.js\' => \'Google-Map-Info-Bubble\'
, \'pace.min.js\' => \'Pace-Script\'
, \'single-reviews-modernizr.custom.79639.js\' => \'single-reviews-modernizr.custom\'
, \'jquery.magnific-popup.js\' => \'jquery-magnific-popup\'
, \'jquery.easing.min.js\' => \'jQuery-Easing\'
, \'jquery.form.js\' => \'jQuery-Ajax-form\'
, \'sns-link.js\' => \'sns-link\'
, \'jquery.raty.min.js\' => \'jQuery-Rating\'
, \'jquery.spectrum.js\' => \'jQuery-Spectrum\'
, \'jquery.parallax.min.js\' => \'jQuery-parallax\'
, \'jquery.javo.mail.js\' => \'jQuery-javo-Emailer\'
, \'bootstrap.hover.dropmenu.min.js\' => \'bootstrap-hover-dropdown\'
, \'../bootstrap/bootstrap-select.js\' => \'bootstrap-select-script\'
, \'bootstrap-tagsinput.min.js\' => \'bootstrap-tagsinput-min\'
, \'javo-footer.js\' => \'javo-Footer-script\'
, \'bootstrap-markdown.js\' => \'bootstrap-markdown\'
, \'bootstrap-markdown.fr.js\' => \'bootstrap-markdown-fr\'
, \'jquery.quicksand.js\' => \'jQuery-QuickSnad\'
, \'jquery.nouislider.min.js\' => \'jQuery-nouiSlider\'
, \'okvideo.min.js\' => \'okVideo-Plugin\'
, \'jquery.slight-submenu.min.js\' => \'slight-submenu.min-Plugin\'
, \'jquery.typehead.js\' => \'jquery-type-header\'
, \'jasny-bootstrap.min.js\' => \'jasny-bootstrap\'
, \'single-reviews-slider.js\' => \'single-reviews-slider\'
, \'common-single-item.js\' => \'common-single-item\'
, \'owl.carousel.min.js\' => \'owl-carousel-script\'
, \'jquery.mixitup.min.js\' => \'mixitup\'
, \'smoothscroll.js\' => \'smoothscroll\'
, \'javo-single-property.js\' => \'javo-single-property\'
/* Widget */
, \'javo-wg-featured-scripts.js\' => \'javo-wg-featured-scripts\'
);
我将此添加到我的函数中。php:
add_action(\'wp_enqueue_scripts\', \'my_remove_scripts\');
function my_remove_scripts(){
wp_dequeue_script( \'jquery.favorite\' );
}
然而,它仍然被称为。
我可以从队列中删除。php,但我宁愿通过函数来实现这一点。php。
谢谢
乔