For smart Primates & ROBOTS (oh and ALIENS ).

Blogroll

Friday, February 24, 2017

How to remove jQuery migrate from WordPress


How to remove jQuery migrate from WordPress.


It is important to preserve jquery_migrate file in Admin section. 
You can remove it from client section if it is not creating any issues, because it load unnecessary in client section.
 
Below are the only 4 lines of code which you needed to paste in your theme's function.php file.




<?php

add_filter( 'wp_default_scripts', 'dequeue_jquery_migrate' );
function dequeue_jquery_migrate( &$scripts){
if(!is_admin()){ $scripts->remove( 'jquery');

 $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.10.2' ); } } 


?>







Share:

0 comments:

Post a Comment

How to make center align child div

 How to make center align child div?   Suppose you have 2 Div tag. And want the make inner tag center <div id="d1">      ...

Ads Inside Post

Powered by Blogger.

Arsip