WordPress.org

Make WordPress Core

Changeset 36898


Ignore:
Timestamp:
03/09/2016 04:54:45 PM (6 years ago)
Author:
DrewAPicture
Message:

Docs: Improve inline documentation syntax throughout WP_Metadata_Lazyloader, introduced in [36566].

See #35816. See #35986.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-metadata-lazyloader.php

    r36897 r36898  
    1818 * In cases where the given metadata may not even be used in the loop, we can improve performance
    1919 * even more by only priming the metadata cache for affected items the first time a piece of metadata
    20  * is requested - ie, by lazyloading it. So, for example, comment meta may not be loaded into the
     20 * is requested - ie, by lazy-loading it. So, for example, comment meta may not be loaded into the
    2121 * cache in the comments section of a post until the first time get_comment_meta() is called in the
    2222 * context of the comment loop.
     
    3434     *
    3535     * @since 4.5.0
     36     * @access protected
    3637     * @var array
    3738     */
     
    4243     *
    4344     * @since 4.5.0
     45     * @access protected
    4446     * @var array
    4547     */
     
    5052     *
    5153     * @since 4.5.0
     54     * @access public
    5255     */
    5356    public function __construct() {
     
    6568
    6669    /**
    67      * Add objects to the metadata lazyload queue.
     70     * Adds objects to the metadata lazy-load queue.
    6871     *
    6972     * @since 4.5.0
     73     * @access public
    7074     *
    71      * @param string $object_type Type of object whose meta is to be lazyloaded. Accepts 'term' or 'comment'.
     75     * @param string $object_type Type of object whose meta is to be lazy-loaded. Accepts 'term' or 'comment'.
    7276     * @param array  $object_ids  Array of object IDs.
    7377     * @return bool|WP_Error True on success, WP_Error on failure.
     
    9498
    9599        /**
    96          * Fires after objects are added to the metadata lazyload queue.
     100         * Fires after objects are added to the metadata lazy-load queue.
    97101         *
    98102         * @since 4.5.0
     
    100104         * @param array                  $object_ids  Object IDs.
    101105         * @param string                 $object_type Type of object being queued.
    102          * @param WP_Metadata_Lazyloader $lazyloader  The lazyloader object.
     106         * @param WP_Metadata_Lazyloader $lazyloader  The lazy-loader object.
    103107         */
    104108        do_action( 'metadata_lazyloader_queued_objects', $object_ids, $object_type, $this );
     
    106110
    107111    /**
    108      * Reset lazyload queue for a given object type.
     112     * Resets lazy-load queue for a given object type.
    109113     *
    110114     * @since 4.5.0
     115     * @access public
    111116     *
    112117     * @param string $object_type Object type. Accepts 'comment' or 'term'.
     
    125130
    126131    /**
    127      * Lazyloads term meta for queued terms.
     132     * Lazy-loads term meta for queued terms.
    128133     *
    129134     * This method is public so that it can be used as a filter callback. As a rule, there
     
    149154
    150155    /**
    151      * Lazyload comment meta for queued comments.
     156     * Lazy-loads comment meta for queued comments.
    152157     *
    153158     * This method is public so that it can be used as a filter callback. As a rule, there is no need to invoke it
Note: See TracChangeset for help on using the changeset viewer.