[wp-trac] [WordPress Trac] #34047: Split up `wp_lazyload_term_meta()`; check `$check` before lazyloading

WordPress Trac noreply at wordpress.org
Sun Sep 27 21:03:16 UTC 2015


#34047: Split up `wp_lazyload_term_meta()`; check `$check` before lazyloading
-------------------------+-----------------------------
 Reporter:  dlh          |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Taxonomy     |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 The attached patch proposes a few adjustments to
 `wp_lazyload_term_meta()`:

 1. Move most of the logic in `wp_lazyload_term_meta()` into a function
 that can be called with any `WP_Query`. The new function could be used by
 queries that aren't going to become the `global $wp_query`. It would also
 be available to developers even if they wanted to unhook
 `wp_lazyload_term_meta()` itself.

 2. Don't do anything in `wp_lazyload_term_meta()` if `$check` is non-null.
 This change would come out of the argument that a developer who is short-
 circuiting `get_metadata()` wouldn't want to `update_termmeta_cache()`
 either.

 3. With (2), decrease the `wp_lazyload_term_meta()` hook priority to allow
 more filters to affect `$check` first.

 4. Try to fix a few docs typos.

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


More information about the wp-trac mailing list