Deregister Scripts Wordpress (wp-includes)

Asked

Viewed 17 times

0

In the wordpress frontend is loaded an array of scripts that are included in the directory wp/includes. Such as:

wp-includes/js/jquery/ui/core.min.js
wp-includes/js/jquery/ui/widget.min.js
wp-includes/js/jquery/ui/mouse.min.js
wp-includes/js/jquery/ui/sortable.min.js
wp-includes/js/jquery/ui/tabs.min.js
wp-includes/js/jquery/ui/accordion.min.js


It is possible (and how) to do the wp_deregister_script() in them?

Note: I know they are needed for wp-admin, so we can use the:

if ( !is_admin() ) wp_deregister_script('script_nome');

1 answer

0

I found a documentation referring to scripts loaded by default by Wordpress, it can be checked at list of wordpress scripts.

In this way, it is enough to use the standard code to deregister the script, taking as an example the "tabs.minjs." who is called "jquery-ui-tabs".

wp_deregister_script('jquery-ui-tabs');

Browser other questions tagged

You are not signed in. Login or sign up in order to post.