[wp-trac] [WordPress Trac] #40948: Load meta files earlier in `ms-settings.php`

WordPress Trac noreply at wordpress.org
Thu Jun 8 12:18:50 UTC 2017


#40948: Load meta files earlier in `ms-settings.php`
----------------------------+-----------------------------
 Reporter:  flixos90        |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Bootstrap/Load  |    Version:
 Severity:  normal          |   Keywords:  2nd-opinion
  Focuses:  multisite       |
----------------------------+-----------------------------
 We're currently working on bringing meta functionality to sites and
 networks. While this is still in the early stages of discussion, we're
 sure that we would at least like to enable plugins to introduce this
 functionality (DB table and API), even if we come to the conclusion that
 site and network meta are not eligible for core itself (see #37923 and
 #25344 for background discussion on site and network meta).

 A general problem is that the meta functionality is not available when
 bootstrapping multisite and when using classes like `WP_Site_Query` and
 `WP_Network_Query` (which need to support `meta_query`). Therefore the
 meta files should be loaded earlier, in particular:

 * `wp-includes/meta.php`
 * `wp-includes/class-wp-meta-query.php`
 * `wp-includes/class-wp-metadata-lazyloader.php`

 They should be loaded together with the other "early" WordPress files.
 This does not only make sense for the above specific use-case, but also
 because the meta API is a generally reusable basic database interaction
 API and allows to work with arbitrary "name-value" pairs, just like
 options. The Options API is also available early, and the Meta API should
 follow.

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


More information about the wp-trac mailing list