Changeset 408669
- Timestamp:
- 07/12/2011 09:12:46 AM (15 years ago)
- Location:
- knowledgeblog-table-of-contents/trunk
- Files:
-
- 2 edited
-
kblog-table-of-contents.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
knowledgeblog-table-of-contents/trunk/kblog-table-of-contents.php
r353764 r408669 9 9 License: GPL2 10 10 11 Copyright 2010 . Simon Cockell ([email protected])11 Copyright 2010-11. Simon Cockell ([email protected]) 12 12 Newcastle University. 13 13 … … 52 52 extract(shortcode_atts(array( 53 53 'cat' => get_option('display_category'), 54 'fill' => 'by', 54 55 ), $atts)); 55 56 $categories = get_categories(); … … 65 66 $author_realname = $author->first_name." ".$author->last_name; 66 67 $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 "; 68 69 if ($author_realname != ' ') { 69 70 $item .= $author_realname ."</li>\n"; … … 76 77 else { 77 78 //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 "; 79 80 $authors = get_coauthors($post->ID); 80 81 $i = 1; 81 82 $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 }86 83 $author_html = ''; 87 84 foreach ($authors as $author) { -
knowledgeblog-table-of-contents/trunk/readme.txt
r353764 r408669 4 4 Tags: table-of-contents, res-comms, scholar, academic, science 5 5 Requires at least: 3.0 6 Tested up to: 3. 16 Tested up to: 3.2 7 7 Stable tag: 0.3 8 8 … … 26 26 == Changelog == 27 27 28 = 0.3 = 29 * Added 'fill' attribute to shortcode, which allows for custom attribution (i.e. 'posted by' to replace the default 'by') 30 28 31 = 0.2 = 29 32 * Version 0.2 can deal with multiple authors, when controlled by the [Co-authors Plus](http://wordpress.org/extend/plugins/co-authors-plus/) plugin. 30 33 * It retains the capacity to cope with normal, singly authored posts. 31 34 35 == Upgrade Notice == 36 32 37 = 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 == 38 Added 'fill' attribute to shortcode, which allows for custom attribution (i.e. 'posted by' to replace the default 'by') 37 39 38 40 = 0.2 = 39 41 This version provides compatibility with Co-authors Plus. 40 41 = 0.3 =42 Bugfix release.43 42 44 43 == Copyright ==
Note: See TracChangeset
for help on using the changeset viewer.