Last active
December 30, 2015 03:39
-
-
Save joshfeck/7770841 to your computer and use it in GitHub Desktop.
This function will disable the NextGen gallery plugin's output buffering that breaks the Espresso API JSON feed. Add this to your theme's functions.php file or your own custom functionality plugin.
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 | |
| // Please do NOT include the opening php tag | |
| /* Wrangle NextGen Gallery so it doesn't break the json API */ | |
| add_action( 'init','ee_nextgen_play_fair',1 ); | |
| function ee_nextgen_play_fair(){ | |
| if( preg_match( "/espresso-api/", $_SERVER['REQUEST_URI'] ) ){ | |
| add_filter( 'run_ngg_resource_manager','__return_false' ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment