Changeset 36898
- Timestamp:
- 03/09/2016 04:54:45 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-metadata-lazyloader.php
r36897 r36898 18 18 * In cases where the given metadata may not even be used in the loop, we can improve performance 19 19 * even more by only priming the metadata cache for affected items the first time a piece of metadata 20 * is requested - ie, by lazy loading it. So, for example, comment meta may not be loaded into the20 * is requested - ie, by lazy-loading it. So, for example, comment meta may not be loaded into the 21 21 * cache in the comments section of a post until the first time get_comment_meta() is called in the 22 22 * context of the comment loop. … … 34 34 * 35 35 * @since 4.5.0 36 * @access protected 36 37 * @var array 37 38 */ … … 42 43 * 43 44 * @since 4.5.0 45 * @access protected 44 46 * @var array 45 47 */ … … 50 52 * 51 53 * @since 4.5.0 54 * @access public 52 55 */ 53 56 public function __construct() { … … 65 68 66 69 /** 67 * Add objects to the metadata lazyload queue.70 * Adds objects to the metadata lazy-load queue. 68 71 * 69 72 * @since 4.5.0 73 * @access public 70 74 * 71 * @param string $object_type Type of object whose meta is to be lazy loaded. Accepts 'term' or 'comment'.75 * @param string $object_type Type of object whose meta is to be lazy-loaded. Accepts 'term' or 'comment'. 72 76 * @param array $object_ids Array of object IDs. 73 77 * @return bool|WP_Error True on success, WP_Error on failure. … … 94 98 95 99 /** 96 * Fires after objects are added to the metadata lazy load queue.100 * Fires after objects are added to the metadata lazy-load queue. 97 101 * 98 102 * @since 4.5.0 … … 100 104 * @param array $object_ids Object IDs. 101 105 * @param string $object_type Type of object being queued. 102 * @param WP_Metadata_Lazyloader $lazyloader The lazy loader object.106 * @param WP_Metadata_Lazyloader $lazyloader The lazy-loader object. 103 107 */ 104 108 do_action( 'metadata_lazyloader_queued_objects', $object_ids, $object_type, $this ); … … 106 110 107 111 /** 108 * Reset lazyload queue for a given object type.112 * Resets lazy-load queue for a given object type. 109 113 * 110 114 * @since 4.5.0 115 * @access public 111 116 * 112 117 * @param string $object_type Object type. Accepts 'comment' or 'term'. … … 125 130 126 131 /** 127 * Lazy loads term meta for queued terms.132 * Lazy-loads term meta for queued terms. 128 133 * 129 134 * This method is public so that it can be used as a filter callback. As a rule, there … … 149 154 150 155 /** 151 * Lazy loadcomment meta for queued comments.156 * Lazy-loads comment meta for queued comments. 152 157 * 153 158 * 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.