Ticket #41700: 41700.diff
| File 41700.diff, 1.8 KB (added by , 9 years ago) |
|---|
-
src/wp-includes/class-wp-query.php
2764 2764 $this->post_count = count( $this->posts ); 2765 2765 $this->set_found_posts( $q, $limits ); 2766 2766 2767 if ( ! $q['suppress_filters'] ) { 2768 /** 2769 * Filters the return value of post results array. 2770 * 2771 * @since 4.9.0 2772 * 2773 * @param array $posts The array that is returned, with ids, wp_posts or id=>parent 2774 * @param WP_Query &$this The WP_Query instance (passed by reference). 2775 */ 2776 $this->posts = apply_filters_ref_array( 'post_query_return', array( $this->posts, &$this ) ); 2777 } 2778 2767 2779 return $this->posts; 2768 2780 } 2769 2781 … … 2783 2795 $r[ (int) $post->ID ] = (int) $post->post_parent; 2784 2796 } 2785 2797 2798 if ( ! $q['suppress_filters'] ) { 2799 /** 2800 * Filters the return value of post results array. 2801 * 2802 * @since 4.9.0 2803 * 2804 * @param array $posts The array that is returned, with ids, wp_posts or id=>parent 2805 * @param WP_Query &$this The WP_Query instance (passed by reference). 2806 */ 2807 $this->posts = apply_filters_ref_array( 'post_query_return', array( $r, &$this ) ); 2808 } 2809 2786 2810 return $r; 2787 2811 } 2788 2812 … … 3002 3026 wp_queue_posts_for_term_meta_lazyload( $this->posts ); 3003 3027 } 3004 3028 3029 if ( ! $q['suppress_filters'] ) { 3030 /** 3031 * Filters the return value of post results array. 3032 * 3033 * @since 4.9.0 3034 * 3035 * @param array $posts The array that is returned, with ids, wp_posts or id=>parent 3036 * @param WP_Query &$this The WP_Query instance (passed by reference). 3037 */ 3038 $this->posts = apply_filters_ref_array( 'post_query_return', array( $this->posts, &$this ) ); 3039 } 3040 3005 3041 return $this->posts; 3006 3042 } 3007 3043