WordPRess GSoC

Opened 5 years ago

Closed 5 years ago

#337 closed enhancement (fixed)

Only include support files if json_route URL matched

Reported by: MikeSchinkel Owned by: rmccue
Milestone: Priority: normal
Component: JSON REST API Keywords:
Cc: MikeSchinkel


The plugin is loading these files for every page load even if the JSON API is not used:

include_once( ABSPATH . WPINC . '/class-IXR.php' );
include_once( ABSPATH . WPINC . '/class-wp-xmlrpc-server.php' );
include_once( dirname( __FILE__ ) . '/lib/class-wp-json-server.php' );

Those files should not be loaded until after json_api_loaded() verifies that /wp-json.php was a matched route.

Change History (1)

#1 @rmccue
5 years ago

  • Owner set to rmccue
  • Resolution set to fixed
  • Status changed from new to closed

In 2150:

Conditionally load classes

This may affect performance. Fixes #337

Note: See TracTickets for help on using tickets.