Ticket #16603: count-posts_3.2.patch
File count-posts_3.2.patch, 641 bytes (added by , 13 years ago) |
---|
-
wp-includes/post.php
1796 1796 1797 1797 $count = wp_cache_get($cache_key, 'counts'); 1798 1798 if ( false !== $count ) 1799 return $count;1799 return apply_filters( 'count_posts', $count, $type, $perm ); 1800 1800 1801 1801 $count = $wpdb->get_results( $wpdb->prepare( $query, $type ), ARRAY_A ); 1802 1802 … … 1810 1810 $stats = (object) $stats; 1811 1811 wp_cache_set($cache_key, $stats, 'counts'); 1812 1812 1813 return $stats;1813 return apply_filters( 'count_posts', $stats, $type, $perm ); 1814 1814 } 1815 1815 1816 1816