From 80654eb17a17793e277f6d0192317f3ead61fa9f Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Thu, 1 Oct 2015 04:01:24 +0000 Subject: [PATCH] s/`add_action()`/`add_filter()` in `WP_Query` metadata lazyloading. Props dlh. See #34047. Built from https://develop.svn.wordpress.org/trunk@34731 git-svn-id: http://core.svn.wordpress.org/trunk@34695 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index f76c994ca1..1d369d9ff8 100644 --- a/wp-includes/query.php +++ b/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'] ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 6ba61c2dad..6f0711eea0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34730'; +$wp_version = '4.4-alpha-34731'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.