Plugin Directory

Changeset 186594


Ignore:
Timestamp:
12/23/2009 03:09:49 PM (16 years ago)
Author:
Gargron
Message:
 
Location:
wt-co-authors/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wt-co-authors/trunk/readme.txt

    r153848 r186594  
    22Tags: authors, links, plugin, posts, post
    33Requires at least: 2.8
    4 Tested up to: 2.8.4
     4Tested up to: 2.9
    55Stable tag: trunk
    66
     
    2121
    2222= 1.7 =
    23 * Author archives now display collaborative posts as well
     23* Little filter enhancement
    2424
    2525= 1.5 =
  • wt-co-authors/trunk/wt-coauthors.php

    r153846 r186594  
    7070//Filter for the author archives, displaying collaborative posts there
    7171//Input: $posts, the array of the filter the_posts
    72 function wt_include_coauthors($posts) {
    73     global $wp_query;
    74     if(is_author()):
    75         $curauth = get_userdata($author->ID);
    76         $curauth_name = $curauth->user_login;
    77         $au_posts = get_posts('meta_key=coauthor&meta_value=' . $curauth_name);
    78         $all_posts = array_merge($posts, $au_posts);
    79         $all_posts = array_unique($all_posts);
    80         return $all_posts;
    81     else:
    82         return $posts;
    83     endif;
    84 }
     72//function wt_include_coauthors($posts) {
     73//    global $wp_query;
     74//    if(is_author()):
     75//        $curauth = get_userdata($author->ID);
     76//       $curauth_name = $curauth->user_login;
     77//       $au_posts = get_posts('meta_key=coauthor&meta_value=' . $curauth_name);
     78//       $all_posts = array_merge($posts, $au_posts);
     79//        $all_posts = array_unique($all_posts);
     80//        return $all_posts;
     81//    else:
     82//        return $posts;
     83//    endif;
     84//}
    8585
    8686//The filtering, for automatisation.
    8787add_filter('the_author', 'wt_the_coauthors');
    88 add_filter('the_posts', 'wt_include_coauthors', 1);
     88add_filter('get_the_author_display_name', 'wt_the_coauthors');
    8989
    9090?>
Note: See TracChangeset for help on using the changeset viewer.