[wp-trac] [WordPress Trac] #34395: Don't load admin files on each request

WordPress Trac noreply at wordpress.org
Thu Oct 22 11:54:03 UTC 2015


#34395: Don't load admin files on each request
--------------------------+-----------------------------
 Reporter:  dimadin       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  REST API      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  performance   |
--------------------------+-----------------------------
 In `wp-settings.php`, where WordPress is actually started, we load `wp-
 includes/rest-api.php` which loads `wp-includes/rest-api/class-wp-rest-
 server.php` which loads `wp-admin/includes/admin.php` which then loads a
 bunch of admin files and translation.

 This is wrong for two reasons:

  * We shouldn't load admin files on each request.
  * It is against #33413.

 I don't see why admin files are needed in `WP_REST_Server` though they
 might be needed by REST API. In that case, it should be lazy loaded
 somewhere.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34395>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list