WordPress.org

WordPRess GSoC Trac

Opened 9 months ago

Closed 9 months 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

Description

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)

comment:1 rmccue9 months 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.