diff -r 0d9a58d2c515 -r 0d28b7c10758 web/wp-content/themes/thematic/library/extensions/content-extensions.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web/wp-content/themes/thematic/library/extensions/content-extensions.php Fri Mar 12 13:29:04 2010 +0000
@@ -0,0 +1,804 @@
+« ';
+ $content .= get_the_title($post->post_parent);
+ $content .= '';
+ } elseif (is_author()) {
+ $content .= '
';
+ if ( !(''== category_description()) ) : $content .= apply_filters('archive_meta', category_description()); endif;
+ $content .= '
';
+ } elseif (is_search()) {
+ $content .= '
+
+
+
+
+ ' .__('Pages:', 'thematic') . '&after=
') ?>
+
+
+
+
+
+
+
+
+
+
+ ' .__('Pages:', 'thematic') . '&after=
') ?>
+
+
+
+
+
+ ' . thematic_postfooter_posteditlink();
+ $postfooter .= "
\n";
+ } elseif ($post->post_type == 'page') { /* For logged-out "page" search results */
+ $postfooter = '';
+ } else {
+ if (is_single()) {
+ $postfooter = '' . thematic_postfooter_postcategory() . thematic_postfooter_posttags() . thematic_postfooter_postconnect();
+ } else {
+ $postfooter = '
' . thematic_postfooter_postcategory() . thematic_postfooter_posttags() . thematic_postfooter_postcomments();
+ }
+ $postfooter .= "
\n";
+ }
+
+ // Put it on the screen
+ echo apply_filters( 'thematic_postfooter', $postfooter ); // Filter to override default post footer
+} // end thematic_postfooter
+
+// Create the post edit link
+function thematic_postfooter_posteditlink() {
+
+ global $id;
+
+ $posteditlink = '
';
+ $posteditlink .= __('Edit', 'thematic') . '';
+ return apply_filters('thematic_postfooter_posteditlink',$posteditlink);
+
+} // end thematic_postfooter_posteditlink
+
+// Create post category
+function thematic_postfooter_postcategory() {
+
+ $postcategory = '
';
+ if (is_single()) {
+ $postcategory .= __('This entry was posted in ', 'thematic') . get_the_category_list(', ');
+ $postcategory .= '';
+ } elseif ( is_category() && $cats_meow = thematic_cats_meow(', ') ) { /* Returns categories other than the one queried */
+ $postcategory .= __('Also posted in ', 'thematic') . $cats_meow;
+ $postcategory .= '
|';
+ } else {
+ $postcategory .= __('Posted in ', 'thematic') . get_the_category_list(', ');
+ $postcategory .= '
|';
+ }
+ return apply_filters('thematic_postfooter_postcategory',$postcategory);
+
+} // end thematic_postfooter_postcategory
+
+// Create post tags
+function thematic_postfooter_posttags() {
+
+ if (is_single()) {
+ $tagtext = __(' and tagged', 'thematic');
+ $posttags = get_the_tag_list("
$tagtext ",', ','');
+ } elseif ( is_tag() && $tag_ur_it = thematic_tag_ur_it(', ') ) { /* Returns tags other than the one queried */
+ $posttags = '
' . __(' Also tagged ', 'thematic') . $tag_ur_it . ' ';
+ } else {
+ $tagtext = __('Tagged', 'thematic');
+ $posttags = get_the_tag_list("
$tagtext ",', ',' ');
+ }
+ return apply_filters('thematic_postfooter_posttags',$posttags);
+
+} // end thematic_postfooter_posttags
+
+// Create comments link and edit link
+function thematic_postfooter_postcomments() {
+ if (comments_open()) {
+ $postcommentnumber = get_comments_number();
+ if ($postcommentnumber > '1') {
+ $postcomments = ' ';
+ } elseif ($postcommentnumber == '1') {
+ $postcomments = ' ';
+ } elseif ($postcommentnumber == '0') {
+ $postcomments = ' ';
+ }
+ } else {
+ $postcomments = ' ';
+ }
+ // Display edit link
+ if (current_user_can('edit_posts')) {
+ $postcomments .= '
| ' . thematic_postfooter_posteditlink();
+ }
+ return apply_filters('thematic_postfooter_postcomments',$postcomments);
+
+} // end thematic_postfooter_postcomments
+
+// Create permalink, comments link, and RSS on single posts
+function thematic_postfooter_postconnect() {
+
+ $postconnect = __('. Bookmark the ', 'thematic') . '
';
+ $postconnect .= __('permalink', 'thematic') . '.';
+ if ((comments_open()) && (pings_open())) { /* Comments are open */
+ $postconnect .= ' ';
+ $postconnect .= __(' or leave a trackback: ', 'thematic');
+ $postconnect .= '
' . __('Trackback URL', 'thematic') . '.';
+ } elseif (!(comments_open()) && (pings_open())) { /* Only trackbacks are open */
+ $postconnect .= __(' Comments are closed, but you can leave a trackback: ', 'thematic');
+ $postconnect .= '
' . __('Trackback URL', 'thematic') . '.';
+ } elseif ((comments_open()) && !(pings_open())) { /* Only comments open */
+ $postconnect .= __(' Trackbacks are closed, but you can ', 'thematic');
+ $postconnect .= '.';
+ } elseif (!(comments_open()) && !(pings_open())) { /* Comments and trackbacks closed */
+ $postconnect .= __(' Both comments and trackbacks are currently closed.', 'thematic');
+ }
+ // Display edit link on single posts
+ if (current_user_can('edit_posts')) {
+ $postconnect .= ' ' . thematic_postfooter_posteditlink();
+ }
+ return apply_filters('thematic_postfooter_postconnect',$postconnect);
+
+} // end thematic_postfooter_postconnect
+
+// Action to create the below navigation
+function thematic_nav_below() {
+ if (is_single()) { ?>
+
+
+
+
+
+
+
+
+
+
« Older posts', 'thematic')) ?>
+
»', 'thematic')) ?>
+
+
+
+ '%link',
+ 'link' => '
« %title',
+ 'in_same_cat' => FALSE,
+ 'excluded_categories' => '');
+ $args = apply_filters('thematic_previous_post_link_args', $args );
+ previous_post_link($args['format'], $args['link'], $args['in_same_cat'], $args['excluded_categories']);
+} // end thematic_previous_post_link
+
+
+// creates the next_post_link
+function thematic_next_post_link() {
+ $args = array ('format' => '%link',
+ 'link' => '%title
»',
+ 'in_same_cat' => FALSE,
+ 'excluded_categories' => '');
+ $args = apply_filters('thematic_next_post_link_args', $args );
+ next_post_link($args['format'], $args['link'], $args['in_same_cat'], $args['excluded_categories']);
+} // end thematic_next_post_link
+
+
+// Produces an avatar image with the hCard-compliant photo class for author info
+function thematic_author_info_avatar() {
+ global $wp_query; $curauth = $wp_query->get_queried_object();
+ $email = $curauth->user_email;
+ $avatar = str_replace( "class='avatar", "class='photo avatar", get_avatar("$email") );
+ echo $avatar;
+} // end thematic_author_info_avatar
+
+
+// For category lists on category archives: Returns other categories except the current one (redundant)
+function thematic_cats_meow($glue) {
+ $current_cat = single_cat_title( '', false );
+ $separator = "\n";
+ $cats = explode( $separator, get_the_category_list($separator) );
+ foreach ( $cats as $i => $str ) {
+ if ( strpos( $str, ">$current_cat<" ) > 0) {
+ unset($cats[$i]);
+ break;
+ }
+ }
+ if ( empty($cats) )
+ return false;
+
+ return trim(join( $glue, $cats ));
+} // end thematic_cats_meow
+
+
+// For tag lists on tag archives: Returns other tags except the current one (redundant)
+function thematic_tag_ur_it($glue) {
+ $current_tag = single_tag_title( '', '', false );
+ $separator = "\n";
+ $tags = explode( $separator, get_the_tag_list( "", "$separator", "" ) );
+ foreach ( $tags as $i => $str ) {
+ if ( strpos( $str, ">$current_tag<" ) > 0 ) {
+ unset($tags[$i]);
+ break;
+ }
+ }
+ if ( empty($tags) )
+ return false;
+
+ return trim(join( $glue, $tags ));
+} // end thematic_tag_ur_it
+
+
+
+?>
\ No newline at end of file