Plugin Directory

Changeset 408669


Ignore:
Timestamp:
07/12/2011 09:12:46 AM (15 years ago)
Author:
knowledgeblog
Message:

Updated for bio-ontologies ToC

Location:
knowledgeblog-table-of-contents/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • knowledgeblog-table-of-contents/trunk/kblog-table-of-contents.php

    r353764 r408669  
    99   License: GPL2
    1010
    11    Copyright 2010. Simon Cockell ([email protected])
     11   Copyright 2010-11. Simon Cockell ([email protected])
    1212   Newcastle University.
    1313 
     
    5252    extract(shortcode_atts(array(
    5353                'cat' => get_option('display_category'),
     54                'fill' => 'by',
    5455            ), $atts));
    5556    $categories = get_categories();
     
    6566                    $author_realname = $author->first_name." ".$author->last_name;
    6667                    $author_url = $author->user_url;
    67                     $item = "<li><a href=" . get_permalink($post->ID) . ">" . get_the_title($post->ID) . "</a> by ";
     68                    $item = "<li><a href=" . get_permalink($post->ID) . ">" . get_the_title($post->ID) . "</a> $fill ";
    6869                    if ($author_realname != ' ') {
    6970                        $item .= $author_realname ."</li>\n";
     
    7677                else {
    7778                    //deal with co-authors
    78                     $item = "<li><a href=" . get_permalink($post->ID) . ">" . get_the_title($post->ID) . "</a> by ";
     79                    $item = "<li><a href=" . get_permalink($post->ID) . ">" . get_the_title($post->ID) . "</a> $fill ";
    7980                    $authors = get_coauthors($post->ID);
    8081                    $i = 1;
    8182                    $len = count($authors);
    82                     if ($len == 1) {
    83                         //circumvent very rare (unique?) bug, where get_coauthors returns wrong info...
    84                         $authors = array(get_userdata($post->post_author));
    85                     }
    8683                    $author_html = '';
    8784                    foreach ($authors as $author) {
  • knowledgeblog-table-of-contents/trunk/readme.txt

    r353764 r408669  
    44Tags: table-of-contents, res-comms, scholar, academic, science
    55Requires at least: 3.0
    6 Tested up to: 3.1
     6Tested up to: 3.2
    77Stable tag: 0.3
    88
     
    2626== Changelog ==
    2727
     28= 0.3 =
     29* Added 'fill' attribute to shortcode, which allows for custom attribution (i.e. 'posted by' to replace the default 'by')
     30
    2831= 0.2 =
    2932* Version 0.2 can deal with multiple authors, when controlled by the [Co-authors Plus](http://wordpress.org/extend/plugins/co-authors-plus/) plugin.
    3033* It retains the capacity to cope with normal, singly authored posts.
    3134
     35== Upgrade Notice ==
     36
    3237= 0.3 =
    33 * Put in a workaround for a bug where get_coauthors() sometimes returns the wrong info.
    34    * Defaults to Wordpress-native author information for posts with a single author.
    35 
    36 == Upgrade Notice ==
     38Added 'fill' attribute to shortcode, which allows for custom attribution (i.e. 'posted by' to replace the default 'by')
    3739
    3840= 0.2 =
    3941This version provides compatibility with Co-authors Plus.
    40 
    41 = 0.3 =
    42 Bugfix release.
    4342
    4443== Copyright ==
Note: See TracChangeset for help on using the changeset viewer.