WP_Metadata_Lazyloader::lazyload_comment_meta()
Lazy-loads comment meta for queued comments.
This method is public so that it can be used as a filter callback. As a rule, there is no need to invoke it directly, from either inside or outside the WP_Query object.
Метод класса: WP_Metadata_Lazyloader{}
Хуков нет.
Возвращает
Разное
. The original value of $check, so as not to short-circuit get_comment_metadata().
Использование
$WP_Metadata_Lazyloader = new WP_Metadata_Lazyloader(); $WP_Metadata_Lazyloader->lazyload_comment_meta( $check );
- $check(разное) (обязательный)
- The $check param passed from the {@see 'get_comment_metadata'} hook.
Список изменений
С версии 4.5.0 | Введена. |
Код WP_Metadata_Lazyloader::lazyload_comment_meta() WP Metadata Lazyloader::lazyload comment meta WP 6.2.2
public function lazyload_comment_meta( $check ) { if ( ! empty( $this->pending_objects['comment'] ) ) { update_meta_cache( 'comment', array_keys( $this->pending_objects['comment'] ) ); // No need to run again for this set of comments. $this->reset_queue( 'comment' ); } return $check; }