Blank pages for all custom API calls after update
-
I have custom API calls set up by adding controllers from a different directory using the following code:
// loop through each file and include it foreach ( glob( dirname( __FILE__ ) . '/api-controllers/*.php' ) as $filename ) { // include file require_once( $filename ); // make controller name lowercase $filename = strtolower( $filename ); $filename = str_replace( '.php', '', $filename ); $filename = basename( $filename ); if ( $filename != 'index' ) { // Register the source file for JSON_API_<controller name>_Controller add_filter( 'json_api_' . $filename . '_controller_path', 'APS_controller_path' ); } } // modify the controller location so we don't have to put controllers in plugin directory function APS_controller_path( $default_path ) { // get what controller this is $controller = basename( $default_path ); // set new path to controller directory return dirname( __FILE__ ) . '/api-controllers/' . $controller; } // register new controlelrs to use function APS_controllers( $controllers ) { // loop through each file and setup a controller for it foreach ( glob( dirname( __FILE__ ) . '/api-controllers/*.php' ) as $filename ) { // make controller name lowercase $filename = strtolower( $filename ); $filename = str_replace( '.php', '', $filename ); $filename = basename( $filename ); if ( $filename != 'index' ) { // add our controllers to existing controllers $controllers[] = $filename; } } // return controllers return $controllers; }
It seems after the update, none of them work. I simply get a blank white screen.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Blank pages for all custom API calls after update’ is closed to new replies.