From 27eb520f0cc2c28dd1787d9bcdcacb52fb668a56 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Thu, 1 Oct 2015 04:00:41 +0000 Subject: [PATCH] s/`add_action()`/`add_filter()` in `WP_Query` metadata lazyloading. Props dlh. See #34047. git-svn-id: https://develop.svn.wordpress.org/trunk@34731 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/query.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/query.php b/src/wp-includes/query.php index f76c994ca1..1d369d9ff8 100644 --- a/src/wp-includes/query.php +++ b/src/wp-includes/query.php @@ -3561,7 +3561,7 @@ class WP_Query { if ( $q['update_post_term_cache'] ) { - add_action( 'get_term_metadata', array( $this, 'lazyload_term_meta' ), 10, 2 ); + add_filter( 'get_term_metadata', array( $this, 'lazyload_term_meta' ), 10, 2 ); } if ( ! $q['suppress_filters'] ) { @@ -3693,7 +3693,7 @@ class WP_Query { // If comments have been fetched as part of the query, make sure comment meta lazy-loading is set up. if ( ! empty( $this->comments ) ) { - add_action( 'get_comment_metadata', array( $this, 'lazyload_comment_meta' ), 10, 2 ); + add_filter( 'get_comment_metadata', array( $this, 'lazyload_comment_meta' ), 10, 2 ); } if ( ! $q['suppress_filters'] ) {