is_multi_author [ WordPress Function ]
is_multi_author ( No parameters )
| Returns: |
|
| Defined at: |
|
Does this site have more than one author
Checks to see if more than one author has published posts.
Source
<?php
function is_multi_author() {
global $wpdb;
if ( false === ( $is_multi_author = wp_cache_get('is_multi_author', 'posts') ) ) {
$rows = (array) $wpdb->get_col("SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 2");
$is_multi_author = 1 < count( $rows ) ? 1 : 0;
wp_cache_set('is_multi_author', $is_multi_author, 'posts');
}
return apply_filters( 'is_multi_author', (bool) $is_multi_author );
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/is multi author « WordPress Codex
Description. This Conditional Tag checks if more than one author has published posts for this site, meaning it returns either TRUE if their is more than one author ...
codex.wordpress.org - WordPress › Support » [Theme: Twenty Eleven] Undefined Function ...
Fatal error: Call to undefined function is_multi_author() in ... I could be wrong, but I believe that is_multi_author() is a function introduced in WordPress 3.2.
wordpress.org - is_multi_author | A HitchHackers guide through WordPress
Jul 5, 2011 ... function is_multi_author() { global $wpdb; if ( false === ( $is_multi_author = wp_cache_get('is_multi_author', 'posts') ) ) { $rows = (array) ...
hitchhackerguide.com - Issue #38: is_multi_author undefined in author_helper? · beastaugh ...
May 16, 2011 ... Seems I was to early downloading the latest version. I get a Fatal error: Call to undefined function is_multi_author() in /is/htdocs/…/www/…
github.com