Changeset 24628 for trunk/wp-includes/author-template.php
- Timestamp:
- 07/10/2013 04:20:41 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/author-template.php
r23528 r24628 373 373 global $wpdb; 374 374 375 if ( false === ( $is_multi_author = wp_cache_get('is_multi_author', 'posts') ) ) {375 if ( false === ( $is_multi_author = get_transient( 'is_multi_author' ) ) ) { 376 376 $rows = (array) $wpdb->get_col("SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 2"); 377 377 $is_multi_author = 1 < count( $rows ) ? 1 : 0; 378 wp_cache_set('is_multi_author', $is_multi_author, 'posts');378 set_transient( 'is_multi_author', $is_multi_author ); 379 379 } 380 380 … … 388 388 */ 389 389 function __clear_multi_author_cache() { 390 wp_cache_delete('is_multi_author', 'posts');390 delete_transient( 'is_multi_author' ); 391 391 } 392 392 add_action('transition_post_status', '__clear_multi_author_cache');
Note: See TracChangeset
for help on using the changeset viewer.