mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-08 06:34:34 +00:00
In #55594 user meta caching was enabled by default when making a `WP_User_Query`. Previously, this was only enabled if a developer specifically queried for 'all_with_meta' fields. User meta caching is implemented using a pluggable function, `cache_users`. If a plugin runs a `WP_User_Query` before pluggable functions have been defined, this will now cause a fatal error. In this commit, a `function_exists` check is introduced to avoid calling `cache_users` if it's not defined. Additionally, a `_doing_it_wrong` notice is issued if the `WP_User_Query::query` method is called before the 'plugins_loaded' hook. Props carazo, subrataemfluence, oakesjosh, spacedmonkey, obenland, SergeyBiryukov, peterwilsoncc. Fixes #56952. git-svn-id: https://develop.svn.wordpress.org/trunk@54766 602fd350-edb4-49c9-b593-d223f7449a82
39 KiB
39 KiB