Created
November 2, 2016 00:54
-
-
Save soberanes/7d88f4f8d99695c9f23aad88f035927d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Adding this script to functions.php | |
| */ | |
| add_filter( 'wp', 'disable_plugin_assets' ); | |
| function disable_plugin_assets(){ | |
| if(strpos($_SERVER['REQUEST_URI'], '/page-slug/') === FALSE) { | |
| //Disable facturacom plugin's assets | |
| //Javascript | |
| wp_dequeue_script('some_script'); | |
| //CSS | |
| wp_dequeue_style('some_stylesheet'); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment