$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>How to disable a jQuery plugin on WordPress plugin page|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

How to disable a jQuery plugin on WordPress plugin page

matteradmin11PV0评论

I have created a WordPress search plugin for a customer. It worked at my site, but when I installed it in my customer's website it broke, because there is a jquery.formstyller plugin installed there, which apparently styled the dropdown I used in the plugin with it's own divs and styles.

Is there a way I can turn off that plugin when the user lands on the plugin page for searching?

I have created a WordPress search plugin for a customer. It worked at my site, but when I installed it in my customer's website it broke, because there is a jquery.formstyller plugin installed there, which apparently styled the dropdown I used in the plugin with it's own divs and styles.

Is there a way I can turn off that plugin when the user lands on the plugin page for searching?

Share Improve this question edited Nov 2, 2018 at 11:21 Krzysiek Dróżdż 25.6k9 gold badges53 silver badges74 bronze badges asked Nov 2, 2018 at 7:37 mazttmaztt 1056 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Sure there is.

https://codex.wordpress/Function_Reference/wp_dequeue_script

/**
 * Dequeue the jQuery UI script.
 *
 * Hooked to the wp_print_scripts action, with a late priority (100),
 * so that it is after the script was enqueued.
 */
function wpdocs_dequeue_script() {
   wp_dequeue_script( 'jquery-ui-core' );
}
add_action( 'wp_print_scripts', 'wpdocs_dequeue_script', 100 );

Obviously replace jquery-ui-core with the handler of the script you want to remove. And don't do this globaly, only for your plugin page, where conflict happens.

Post a comment

comment list (0)

  1. No comments so far