Make WordPress Core

Changeset 34731


Ignore:
Timestamp:
10/01/2015 04:00:41 AM (9 years ago)
Author:
boonebgorges
Message:

s/add_action()/add_filter() in WP_Query metadata lazyloading.

Props dlh.
See #34047.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/query.php

    r34711 r34731  
    35623562
    35633563        if ( $q['update_post_term_cache'] ) {
    3564             add_action( 'get_term_metadata', array( $this, 'lazyload_term_meta' ), 10, 2 );
     3564            add_filter( 'get_term_metadata', array( $this, 'lazyload_term_meta' ), 10, 2 );
    35653565        }
    35663566
     
    36943694        // If comments have been fetched as part of the query, make sure comment meta lazy-loading is set up.
    36953695        if ( ! empty( $this->comments ) ) {
    3696             add_action( 'get_comment_metadata', array( $this, 'lazyload_comment_meta' ), 10, 2 );
     3696            add_filter( 'get_comment_metadata', array( $this, 'lazyload_comment_meta' ), 10, 2 );
    36973697        }
    36983698
Note: See TracChangeset for help on using the changeset viewer.