jquery in wordpress plugin with depdendency

You will have to load jquery.formstyler first to use it in your ajax.js. You can add it as another dependancie like jquery itself. wp_enqueue_script( ‘my-ajax-handle’, plugin_dir_url( _FILE_ ) . ‘guards_search/js/ajax.js’, array( ‘jquery’, ‘jquery.formstyler’ ) ); Also you have a little syntax issue in: wp_register_style(‘jquery.formstyler’, plugin_dir_url( _FILE_ ) . ‘guards_search/js/jquery.formstyler.min.js’); It should be register script, not … Read more

How to disable a jQuery plugin on WordPress plugin page

Sure there is. https://codex.wordpress.org/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 … Read more

add_action pre_term_description vs. pre_category_description

Categories and tags are both terms, which is why your code is running twice. What you need to is use the second argument passed to the callbacks for the pre_term_description hook, which tells you the taxonomy the filter is currently being applied for: function wpse_321166_default_term_description( $description, $taxonomy ) { if ( $description ) { return … Read more