WordPress.org

Make WordPress Core

Ticket #14405: saner-is-multi-author.diff

File saner-is-multi-author.diff, 522 bytes (added by iandstewart, 8 years ago)
  • author-template.php

     
    368368        echo $return;
    369369}
    370370
     371/**
     372 * Returns true if there is more than one user with a published post
     373 */
     374function is_multi_author() {
     375        global $wpdb;
     376       
     377        return (bool) ( 1 < $wpdb->get_var("SELECT COUNT(DISTINCT(post_author)) FROM $wpdb->posts WHERE post_type = 'post' AND " . get_private_posts_cap_sql( 'post' ) ) );     
     378}
     379
    371380?>