Created
June 14, 2019 08:05
-
-
Save pascalbajorat/d232a7b5a0bfd4c852779d907e3e9be6 to your computer and use it in GitHub Desktop.
PB SEO Friendly Images Pro - Exclude filter
This file contains 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 | |
/* Place this in your functions */ | |
function pbsfi_is_optimization_allowed($val) { | |
/* | |
* Use Conditional functions here to disable the plugin for specific posts or pages | |
* for example with is_page(12) for a page with ID 12: | |
* https://developer.wordpress.org/reference/functions/is_page/ | |
* | |
* List of Conditional Tags: https://developer.wordpress.org/themes/basics/conditional-tags/ | |
*/ | |
if( is_page(12) ) { | |
add_filter('is_optimization_allowed', '__return_false'); | |
} | |
} | |
add_function('wp_loaded', 'pbsfi_is_optimization_allowed'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment