Ticket #25514: 25514.diff
File 25514.diff, 20.9 KB (added by , 11 years ago) |
---|
-
src/wp-includes/query.php
1713 1713 $this->query_vars_hash = md5( serialize( $this->query_vars ) ); 1714 1714 $this->query_vars_changed = false; 1715 1715 1716 do_action_ref_array('parse_query', array(&$this)); 1716 /** 1717 * Fires after the main query vars have been parsed. 1718 * 1719 * @since 1.5.0 1720 * 1721 * @param WP_Query &$this The WP_Query instance (passed by reference). 1722 */ 1723 do_action_ref_array( 'parse_query', array( &$this ) ); 1717 1724 } 1718 1725 1719 1726 /** … … 1920 1927 1921 1928 $this->tax_query = new WP_Tax_Query( $tax_query ); 1922 1929 1930 /** 1931 * Fires after taxonomy-related query vars have been parsed. 1932 * 1933 * @since 3.7.0 1934 * 1935 * @param WP_Query $this The WP_Query instance. 1936 */ 1923 1937 do_action( 'parse_tax_query', $this ); 1924 1938 } 1925 1939 … … 2155 2169 2156 2170 $this->parse_query(); 2157 2171 2158 do_action_ref_array('pre_get_posts', array(&$this)); 2172 /** 2173 * Fires after the query variable object is created, but before the actual query is run. 2174 * 2175 * Note: If using conditional tags, use the method versions within the passed instance 2176 * (e.g. $this->is_main_query() instead of is_main_query()). This is because the functions 2177 * like is_main_query() test against the global $wp_query instance, not the passed one. 2178 * 2179 * @since 2.0.0 2180 * 2181 * @param WP_Query &$this The WP_Query instance (passed by reference). 2182 */ 2183 do_action_ref_array( 'pre_get_posts', array( &$this ) ); 2159 2184 2160 2185 // Shorthand. 2161 2186 $q = &$this->query_vars; … … 2759 2784 $where_status = implode( ' OR ', $statuswheres ); 2760 2785 if ( ! empty( $where_status ) ) { 2761 2786 $where .= " AND ($where_status)"; 2762 } 2787 } 2763 2788 } elseif ( !$this->is_singular ) { 2764 2789 $where .= " AND ($wpdb->posts.post_status = 'publish'"; 2765 2790 … … 2794 2819 $where .= $clauses['where']; 2795 2820 } 2796 2821 2797 // Apply filters on where and join prior to paging so that any 2798 // manipulations to them are reflected in the paging by day queries. 2822 /* 2823 * Apply filters on where and join prior to paging so that any 2824 * manipulations to them are reflected in the paging by day queries. 2825 */ 2799 2826 if ( !$q['suppress_filters'] ) { 2800 $where = apply_filters_ref_array('posts_where', array( $where, &$this ) ); 2801 $join = apply_filters_ref_array('posts_join', array( $join, &$this ) ); 2827 /** 2828 * Filter the WHERE clause of the query. 2829 * 2830 * @since 1.5.0 2831 * 2832 * @param string $where The WHERE clause of the query. 2833 * @param WP_Query &$this The WP_Query instance (passed by reference). 2834 */ 2835 $where = apply_filters_ref_array( 'posts_where', array( $where, &$this ) ); 2836 2837 /** 2838 * Filter the JOIN clause of the query. 2839 * 2840 * @since 1.5.0 2841 * 2842 * @param string $where The JOIN clause of the query. 2843 * @param WP_Query &$this The WP_Query instance (passed by reference). 2844 */ 2845 $join = apply_filters_ref_array( 'posts_join', array( $join, &$this ) ); 2802 2846 } 2803 2847 2804 2848 // Paging … … 2829 2873 } 2830 2874 2831 2875 if ( !$q['suppress_filters'] ) { 2832 $cjoin = apply_filters_ref_array('comment_feed_join', array( $cjoin, &$this ) ); 2833 $cwhere = apply_filters_ref_array('comment_feed_where', array( $cwhere, &$this ) ); 2834 $cgroupby = apply_filters_ref_array('comment_feed_groupby', array( $cgroupby, &$this ) ); 2835 $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) ); 2836 $climits = apply_filters_ref_array('comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) ); 2876 /** 2877 * Filter the JOIN clause of the comments feed query before sending. 2878 * 2879 * @since 2.2.0 2880 * 2881 * @param string $cjoin The JOIN clause of the query. 2882 * @param WP_Query &$this The WP_Query instance (passed by reference). 2883 */ 2884 $cjoin = apply_filters_ref_array( 'comment_feed_join', array( $cjoin, &$this ) ); 2885 2886 /** 2887 * Filter the WHERE clause of the comments feed query before sending. 2888 * 2889 * @since 2.2.0 2890 * 2891 * @param string $cwhere The WHERE clause of the query. 2892 * @param WP_Query &$this The WP_Query instance (passed by reference). 2893 */ 2894 $cwhere = apply_filters_ref_array( 'comment_feed_where', array( $cwhere, &$this ) ); 2895 2896 /** 2897 * Filter the GROUP BY clause of the comments feed query before sending. 2898 * 2899 * @since 2.2.0 2900 * 2901 * @param string $cgroupby The GROUP BY clause of the query. 2902 * @param WP_Query &$this The WP_Query instance (passed by reference). 2903 */ 2904 $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( $cgroupby, &$this ) ); 2905 2906 /** 2907 * Filter the ORDER BY clause of the comments feed query before sending. 2908 * 2909 * @since 2.8.0 2910 * 2911 * @param string $corderby The ORDER BY clause of the query. 2912 * @param WP_Query &$this The WP_Query instance (passed by reference). 2913 */ 2914 $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) ); 2915 2916 /** 2917 * Filter the LIMIT clause of the comments feed query before sending. 2918 * 2919 * @since 2.8.0 2920 * 2921 * @param string $climits The JOIN clause of the query. 2922 * @param WP_Query &$this The WP_Query instance (passed by reference). 2923 */ 2924 $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) ); 2837 2925 } 2838 2926 $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : ''; 2839 2927 $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; … … 2856 2944 2857 2945 $pieces = array( 'where', 'groupby', 'join', 'orderby', 'distinct', 'fields', 'limits' ); 2858 2946 2859 // Apply post-paging filters on where and join. Only plugins that 2860 // manipulate paging queries should use these hooks. 2947 /* 2948 * Apply post-paging filters on where and join. Only plugins that 2949 * manipulate paging queries should use these hooks. 2950 */ 2861 2951 if ( !$q['suppress_filters'] ) { 2952 /** 2953 * Filter the WHERE clause of the query. 2954 * 2955 * Specifically for manipulating paging queries. 2956 * 2957 * @since 1.5.0 2958 * 2959 * @param string $where The WHERE clause of the query. 2960 * @param WP_Query &$this The WP_Query instance (passed by reference). 2961 */ 2862 2962 $where = apply_filters_ref_array( 'posts_where_paged', array( $where, &$this ) ); 2963 2964 /** 2965 * Filter the GROUP BY clause of the query. 2966 * 2967 * @since 2.0.0 2968 * 2969 * @param string $groupby The GROUP BY clause of the query. 2970 * @param WP_Query &$this The WP_Query instance (passed by reference). 2971 */ 2863 2972 $groupby = apply_filters_ref_array( 'posts_groupby', array( $groupby, &$this ) ); 2973 2974 /** 2975 * Filter the JOIN clause of the query. 2976 * 2977 * Specifically for manipulating paging queries. 2978 * 2979 * @since 1.5.0 2980 * 2981 * @param string $join The JOIN clause of the query. 2982 * @param WP_Query &$this The WP_Query instance (passed by reference). 2983 */ 2864 2984 $join = apply_filters_ref_array( 'posts_join_paged', array( $join, &$this ) ); 2985 2986 /** 2987 * Filter the ORDER BY clause of the query. 2988 * 2989 * @since 1.5.1 2990 * 2991 * @param string $orderby The ORDER BY clause of the query. 2992 * @param WP_Query &$this The WP_Query instance (passed by reference). 2993 */ 2865 2994 $orderby = apply_filters_ref_array( 'posts_orderby', array( $orderby, &$this ) ); 2995 2996 /** 2997 * Filter the DISTINCT clause of the query. 2998 * 2999 * @since 2.1.0 3000 * 3001 * @param string $distinct The DISTINCT clause of the query. 3002 * @param WP_Query &$this The WP_Query instance (passed by reference). 3003 */ 2866 3004 $distinct = apply_filters_ref_array( 'posts_distinct', array( $distinct, &$this ) ); 3005 3006 /** 3007 * Filter the LIMIT clause of the query. 3008 * 3009 * @since 2.1.0 3010 * 3011 * @param string $limits The LIMIT clause of the query. 3012 * @param WP_Query &$this The WP_Query instance (passed by reference). 3013 */ 2867 3014 $limits = apply_filters_ref_array( 'post_limits', array( $limits, &$this ) ); 3015 3016 /** 3017 * Filter the SELECT clause of the query. 3018 * 3019 * @since 2.1.0 3020 * 3021 * @param string $fields The SELECT clause of the query. 3022 * @param WP_Query &$this The WP_Query instance (passed by reference). 3023 */ 2868 3024 $fields = apply_filters_ref_array( 'posts_fields', array( $fields, &$this ) ); 2869 3025 2870 // Filter all clauses at once, for convenience 3026 /** 3027 * Filter all query clauses at once, for convenience. 3028 * 3029 * Covers the WHERE, GROUP BY, JOIN, ORDER BY, DISTINCT, 3030 * fields (SELECT), and LIMITS clauses. 3031 * 3032 * @since 3.1.0 3033 * 3034 * @param array $clauses The list of clauses for the query. 3035 * @param WP_Query &$this The WP_Query instance (passed by reference). 3036 */ 2871 3037 $clauses = (array) apply_filters_ref_array( 'posts_clauses', array( compact( $pieces ), &$this ) ); 2872 foreach ( $pieces as $piece ) 3038 3039 foreach ( $pieces as $piece ) { 2873 3040 $$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : ''; 3041 } 2874 3042 } 2875 3043 2876 // Announce current selection parameters. For use by caching plugins. 3044 /** 3045 * Fires to announce the query's current selection parameters. 3046 * 3047 * For use by caching plugins. 3048 * 3049 * @since 2.3.0 3050 * 3051 * @param string $selection The assembled selection query. 3052 */ 2877 3053 do_action( 'posts_selection', $where . $groupby . $orderby . $limits . $join ); 2878 3054 2879 // Filter again for the benefit of caching plugins. Regular plugins should use the hooks above. 3055 /* 3056 * Filter again for the benefit of caching plugins. 3057 * Regular plugins should use the hooks above. 3058 */ 2880 3059 if ( !$q['suppress_filters'] ) { 3060 /** 3061 * Filter the WHERE clause of the query. 3062 * 3063 * For use by caching plugins. 3064 * 3065 * @since 2.5.0 3066 * 3067 * @param string $where The WHERE clause of the query. 3068 * @param WP_Query &$this The WP_Query instance (passed by reference). 3069 */ 2881 3070 $where = apply_filters_ref_array( 'posts_where_request', array( $where, &$this ) ); 3071 3072 /** 3073 * Filter the GROUP BY clause of the query. 3074 * 3075 * For use by caching plugins. 3076 * 3077 * @since 2.5.0 3078 * 3079 * @param string $groupby The GROUP BY clause of the query. 3080 * @param WP_Query &$this The WP_Query instance (passed by reference). 3081 */ 2882 3082 $groupby = apply_filters_ref_array( 'posts_groupby_request', array( $groupby, &$this ) ); 3083 3084 /** 3085 * Filter the JOIN clause of the query. 3086 * 3087 * For use by caching plugins. 3088 * 3089 * @since 2.5.0 3090 * 3091 * @param string $join The JOIN clause of the query. 3092 * @param WP_Query &$this The WP_Query instance (passed by reference). 3093 */ 2883 3094 $join = apply_filters_ref_array( 'posts_join_request', array( $join, &$this ) ); 3095 3096 /** 3097 * Filter the ORDER BY clause of the query. 3098 * 3099 * For use by caching plugins. 3100 * 3101 * @since 2.5.0 3102 * 3103 * @param string $orderby The ORDER BY clause of the query. 3104 * @param WP_Query &$this The WP_Query instance (passed by reference). 3105 */ 2884 3106 $orderby = apply_filters_ref_array( 'posts_orderby_request', array( $orderby, &$this ) ); 3107 3108 /** 3109 * Filter the DISTINCT clause of the query. 3110 * 3111 * For use by caching plugins. 3112 * 3113 * @since 2.5.0 3114 * 3115 * @param string $distinct The DISTINCT clause of the query. 3116 * @param WP_Query &$this The WP_Query instance (passed by reference). 3117 */ 2885 3118 $distinct = apply_filters_ref_array( 'posts_distinct_request', array( $distinct, &$this ) ); 3119 3120 /** 3121 * Filter the SELECT clause of the query. 3122 * 3123 * For use by caching plugins. 3124 * 3125 * @since 2.5.0 3126 * 3127 * @param string $fields The SELECT clause of the query. 3128 * @param WP_Query &$this The WP_Query instance (passed by reference). 3129 */ 2886 3130 $fields = apply_filters_ref_array( 'posts_fields_request', array( $fields, &$this ) ); 3131 3132 /** 3133 * Filter the LIMIT clause of the query. 3134 * 3135 * For use by caching plugins. 3136 * 3137 * @since 2.5.0 3138 * 3139 * @param string $limits The LIMIT clause of the query. 3140 * @param WP_Query &$this The WP_Query instance (passed by reference). 3141 */ 2887 3142 $limits = apply_filters_ref_array( 'post_limits_request', array( $limits, &$this ) ); 2888 3143 2889 // Filter all clauses at once, for convenience 3144 /** 3145 * Filter all query clauses at once, for convenience. 3146 * 3147 * For use by caching plugins. 3148 * 3149 * Covers the WHERE, GROUP BY, JOIN, ORDER BY, DISTINCT, 3150 * fields (SELECT), and LIMITS clauses. 3151 * 3152 * @since 3.1.0 3153 * 3154 * @param array $pieces The pieces of the query. 3155 * @param WP_Query &$this The WP_Query instance (passed by reference). 3156 */ 2890 3157 $clauses = (array) apply_filters_ref_array( 'posts_clauses_request', array( compact( $pieces ), &$this ) ); 2891 3158 foreach ( $pieces as $piece ) 2892 3159 $$piece = isset( $clauses[ $piece ] ) ? $clauses[ $piece ] : ''; … … 2904 3171 $this->request = $old_request = "SELECT $found_rows $distinct $fields FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits"; 2905 3172 2906 3173 if ( !$q['suppress_filters'] ) { 3174 /** 3175 * Filter the completed SQL query before sending. 3176 * 3177 * @since 2.0.0 3178 * 3179 * @param array $request The complete SQL query. 3180 * @param WP_Query &$this The WP_Query instance (passed by reference). 3181 */ 2907 3182 $this->request = apply_filters_ref_array( 'posts_request', array( $this->request, &$this ) ); 2908 3183 } 2909 3184 … … 2928 3203 } 2929 3204 2930 3205 $split_the_query = ( $old_request == $this->request && "$wpdb->posts.*" == $fields && !empty( $limits ) && $q['posts_per_page'] < 500 ); 3206 3207 /** 3208 * Filter the $split_the_query boolean. 3209 * 3210 * Splitting the query will cause it to fetch just the IDs of the found posts 3211 * (and then individually fetch each post by ID), rather than fetching every 3212 * complete row at once. One massive result vs. many small results. 3213 * 3214 * @since 3.4.0 3215 * 3216 * @param bool $split_the_query Whether or not to split the query. 3217 * @param WP_Query $this The WP_Query instance. 3218 */ 2931 3219 $split_the_query = apply_filters( 'split_the_query', $split_the_query, $this ); 2932 3220 2933 3221 if ( $split_the_query ) { … … 2935 3223 2936 3224 $this->request = "SELECT $found_rows $distinct $wpdb->posts.ID FROM $wpdb->posts $join WHERE 1=1 $where $groupby $orderby $limits"; 2937 3225 3226 /** 3227 * Filter the Post IDs SQL request before sending. 3228 * 3229 * @since 3.4.0 3230 * 3231 * @param string $request The post ID request. 3232 * @param WP_Query $this The WP_Query instance. 3233 */ 2938 3234 $this->request = apply_filters( 'posts_request_ids', $this->request, $this ); 2939 3235 2940 3236 $ids = $wpdb->get_col( $this->request ); … … 2955 3251 if ( $this->posts ) 2956 3252 $this->posts = array_map( 'get_post', $this->posts ); 2957 3253 2958 // Raw results filter. Prior to status checks. 2959 if ( !$q['suppress_filters'] ) 2960 $this->posts = apply_filters_ref_array('posts_results', array( $this->posts, &$this ) ); 3254 if ( ! $q['suppress_filters'] ) { 3255 /** 3256 * Filter the raw post results array, prior to status checks. 3257 * 3258 * @since 2.3.0 3259 * 3260 * @param array $posts The post results array. 3261 * @param WP_Query &$this The WP_Query instance (passed by reference). 3262 */ 3263 $this->posts = apply_filters_ref_array( 'posts_results', array( $this->posts, &$this ) ); 3264 } 2961 3265 2962 3266 if ( !empty($this->posts) && $this->is_comment_feed && $this->is_singular ) { 2963 $cjoin = apply_filters_ref_array('comment_feed_join', array( '', &$this ) ); 2964 $cwhere = apply_filters_ref_array('comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) ); 2965 $cgroupby = apply_filters_ref_array('comment_feed_groupby', array( '', &$this ) ); 3267 /** This filter is documented in wp-includes/query.php */ 3268 $cjoin = apply_filters_ref_array( 'comment_feed_join', array( '', &$this ) ); 3269 3270 /** This filter is documented in wp-includes/query.php */ 3271 $cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1'", &$this ) ); 3272 3273 /** This filter is documented in wp-includes/query.php */ 3274 $cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) ); 2966 3275 $cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : ''; 2967 $corderby = apply_filters_ref_array('comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) ); 3276 3277 /** This filter is documented in wp-includes/query.php */ 3278 $corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) ); 2968 3279 $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; 2969 $climits = apply_filters_ref_array('comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) ); 3280 3281 /** This filter is documented in wp-includes/query.php */ 3282 $climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option('posts_per_rss'), &$this ) ); 3283 2970 3284 $comments_request = "SELECT $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby $corderby $climits"; 2971 3285 $this->comments = $wpdb->get_results($comments_request); 2972 3286 $this->comment_count = count($this->comments); … … 3000 3314 } 3001 3315 } 3002 3316 3003 if ( $this->is_preview && $this->posts && current_user_can( $edit_cap, $this->posts[0]->ID ) ) 3317 if ( $this->is_preview && $this->posts && current_user_can( $edit_cap, $this->posts[0]->ID ) ) { 3318 /** 3319 * Filter the single post for preview mode. 3320 * 3321 * @since 2.7.0 3322 * 3323 * @param WP_Post $post_preview The Post object. 3324 * @param WP_Query &$this The WP_Query instance (passed by reference). 3325 */ 3004 3326 $this->posts[0] = get_post( apply_filters_ref_array( 'the_preview', array( $this->posts[0], &$this ) ) ); 3327 } 3005 3328 } 3006 3329 3007 3330 // Put sticky posts at the top of the posts array … … 3045 3368 } 3046 3369 } 3047 3370 3048 if ( !$q['suppress_filters'] ) 3049 $this->posts = apply_filters_ref_array('the_posts', array( $this->posts, &$this ) ); 3371 if ( ! $q['suppress_filters'] ) { 3372 /** 3373 * Filter the array of retrieved posts after they've been fetched and 3374 * internally processed. 3375 * 3376 * @since 1.5.0 3377 * 3378 * @param array $posts The array of retrieved posts. 3379 * @param WP_Query &$this The WP_Query instance (passed by reference). 3380 */ 3381 $this->posts = apply_filters_ref_array( 'the_posts', array( $this->posts, &$this ) ); 3382 } 3050 3383 3051 3384 // Ensure that any posts added/modified via one of the filters above are 3052 3385 // of the type WP_Post and are filtered. … … 3082 3415 if ( $q['no_found_rows'] || ( is_array( $this->posts ) && ! $this->posts ) ) 3083 3416 return; 3084 3417 3085 if ( ! empty( $limits ) ) 3418 if ( ! empty( $limits ) ) { 3419 /** 3420 * Filter the query to run for retrieving the found posts. 3421 * 3422 * @since 2.1.0 3423 * 3424 * @param string $found_posts The query to run to find the found posts. 3425 * @param WP_Query &$this The WP_Query instance (passed by reference). 3426 */ 3086 3427 $this->found_posts = $wpdb->get_var( apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) ) ); 3087 else3428 } else { 3088 3429 $this->found_posts = count( $this->posts ); 3430 } 3089 3431 3432 /** 3433 * Filter the number of found posts for the query. 3434 * 3435 * @since 2.1.0 3436 * 3437 * @param int $found_posts The number of posts found. 3438 * @param WP_Query &$this The WP_Query instance (passed by reference). 3439 */ 3090 3440 $this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) ); 3091 3441 3092 3442 if ( ! empty( $limits ) ) … … 3125 3475 $this->in_the_loop = true; 3126 3476 3127 3477 if ( $this->current_post == -1 ) // loop has just started 3128 do_action_ref_array('loop_start', array(&$this)); 3478 /** 3479 * Fires once the loop is started. 3480 * 3481 * @since 2.0.0 3482 * 3483 * @param WP_Query &$this The WP_Query instance (passed by reference). 3484 */ 3485 do_action_ref_array( 'loop_start', array( &$this ) ); 3129 3486 3130 3487 $post = $this->next_post(); 3131 3488 setup_postdata($post); … … 3146 3503 if ( $this->current_post + 1 < $this->post_count ) { 3147 3504 return true; 3148 3505 } elseif ( $this->current_post + 1 == $this->post_count && $this->post_count > 0 ) { 3149 do_action_ref_array('loop_end', array(&$this)); 3506 /** 3507 * Fires once the loop has ended. 3508 * 3509 * @since 2.0.0 3510 * 3511 * @param WP_Query &$this The WP_Query instance (passed by reference). 3512 */ 3513 do_action_ref_array( 'loop_end', array( &$this ) ); 3150 3514 // Do some cleaning up after the loop 3151 3515 $this->rewind_posts(); 3152 3516 } … … 3197 3561 $comment = $this->next_comment(); 3198 3562 3199 3563 if ( $this->current_comment == 0 ) { 3200 do_action('comment_loop_start'); 3564 /** 3565 * Fires once the comment loop is started. 3566 * 3567 * @since 2.2.0 3568 */ 3569 do_action( 'comment_loop_start' ); 3201 3570 } 3202 3571 } 3203 3572 … … 3990 4359 $pages = array( $post->post_content ); 3991 4360 } 3992 4361 3993 do_action_ref_array('the_post', array(&$post)); 4362 /** 4363 * Fires once the post data has been setup. 4364 * 4365 * @since 2.8.0 4366 * 4367 * @param WP_Post &$post The Post object (passed by reference). 4368 */ 4369 do_action_ref_array( 'the_post', array( &$post ) ); 3994 4370 3995 4371 return true; 3996 4372 }