« '; $content .= get_the_title($post->post_parent); $content .= ''; } elseif (is_author()) { $content .= '

'; $author = get_the_author(); $content .= __('Author Archives: ', 'thematic'); $content .= ''; $content .= $author; $content .= '

'; } elseif (is_category()) { $content .= '

'; $content .= __('Category Archives:', 'thematic'); $content .= ' '; $content .= single_cat_title('', FALSE); $content .= '

' . "\n"; $content .= '
'; if ( !(''== category_description()) ) : $content .= apply_filters('archive_meta', category_description()); endif; $content .= '
'; } elseif (is_search()) { $content .= '

'; $content .= __('Search Results for:', 'thematic'); $content .= ' '; $content .= wp_specialchars(stripslashes($_GET['s']), true); $content .= '

'; } elseif (is_tag()) { $content .= '

'; $content .= __('Tag Archives:', 'thematic'); $content .= ' '; $content .= __(thematic_tag_query()); $content .= '

'; } elseif (is_day()) { $content .= '

'; $content .= sprintf(__('Daily Archives: %s', 'thematic'), get_the_time(get_option('date_format'))); $content .= '

'; } elseif (is_month()) { $content .= '

'; $content .= sprintf(__('Monthly Archives: %s', 'thematic'), get_the_time('F Y')); $content .= '

'; } elseif (is_year()) { $content .= '

'; $content .= sprintf(__('Yearly Archives: %s', 'thematic'), get_the_time('Y')); $content .= '

'; } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { $content .= '

'; $content .= __('Blog Archives', 'thematic'); $content .= '

'; } $content .= "\n"; echo apply_filters('thematic_page_title', $content); } // Action to create the above navigation function thematic_nav_above() { if (is_single()) { ?>
' .__('Pages:', 'thematic') . '&after=
') ?>
' .__('Pages:', 'thematic') . '&after=
') ?>
'; $posteditlink .= __('Edit', 'thematic') . ''; $posteditlink = apply_filters('thematic_postheader_posteditlink',$posteditlink); if (is_single() || is_page()) { $posttitle = '

' . get_the_title() . "

\n"; } elseif (is_404()) { $posttitle = '

' . __('Not Found', 'thematic') . "

\n"; } else { $posttitle = '

'; $posttitle .= get_the_title(); $posttitle .= "

\n"; } $posttitle = apply_filters('thematic_postheader_posttitle',$posttitle); $postmeta = '
'; $postmeta .= '' . __('By ', 'thematic') . ''; $postmeta .= ''. ''; $postmeta .= get_the_author(); $postmeta .= ' | '; $postmeta .= '' . __('Published: ', 'thematic') . ''; $postmeta .= ''; $postmeta .= get_the_time(thematic_time_display()); $postmeta .= ''; // Display edit link if (current_user_can('edit_posts')) { $postmeta .= ' | ' . '' . $posteditlink . ''; } $postmeta .= "
\n"; $postmeta = apply_filters('thematic_postheader_postmeta',$postmeta); if ($post->post_type == 'page' || is_404()) { $postheader = $posttitle; } else { $postheader = $posttitle . $postmeta; } echo apply_filters( 'thematic_postheader', $postheader ); // Filter to override default post header } // end thematic_postheader //creates the content function thematic_content() { if (is_home() || is_front_page()) { $content = 'full'; } elseif (is_single()) { $content = 'full'; } elseif (is_tag()) { $content = 'excerpt'; } elseif (is_search()) { $content = 'excerpt'; } elseif (is_category()) { $content = 'excerpt'; } elseif (is_author()) { $content = 'excerpt'; } elseif (is_archive()) { $content = 'excerpt'; } $content = apply_filters('thematic_content', $content); if ( strtolower($content) == 'full' ) { $post = get_the_content(more_text()); $post = apply_filters('the_content', $post); $post = str_replace(']]>', ']]>', $post); } elseif ( strtolower($content) == 'excerpt') { $post = get_the_excerpt(); } elseif ( strtolower($content) == 'none') { } else { $post = get_the_content(more_text()); $post = apply_filters('the_content', $post); $post = str_replace(']]>', ']]>', $post); } echo apply_filters('thematic_post', $post); } // end thematic_content // Functions that hook into thematic_archives() // Open .archives-page function thematic_archivesopen() { ?>

»', 'thematic').''; return apply_filters('more_text', $content); } // end more_text // creates the $more_link_text for the_content function list_bookmarks_args() { $content = 'title_before=

&title_after=

'; return apply_filters('list_bookmarks_args', $content); } // end more_text // Information in Post Footer function thematic_postfooter() { global $id, $post; // Create $posteditlink $posteditlink .= ''; $posteditlink .= __('Edit', 'thematic') . ''; $posteditlink = apply_filters('thematic_postfooter_posteditlink',$posteditlink); // Display the post categories $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 .= ' |'; } $postcategory = apply_filters('thematic_postfooter_postcategory',$postcategory); // Display the tags 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 ",', ',' |'); } $posttags = apply_filters('thematic_postfooter_posttags',$posttags); // Display comments link and edit link if (comments_open()) { $postcommentnumber = get_comments_number(); if ($postcommentnumber > '1') { $postcomments = ' '; $postcomments .= get_comments_number() . __(' Comments', 'thematic') . ''; } elseif ($postcommentnumber == '1') { $postcomments = ' '; $postcomments .= get_comments_number() . __(' Comment', 'thematic') . ''; } elseif ($postcommentnumber == '0') { $postcomments = ' '; $postcomments .= __('Leave a comment', 'thematic') . ''; } } else { $postcomments = ' ' . __('Comments closed', 'thematic') .''; } // Display edit link if (current_user_can('edit_posts')) { $postcomments .= ' | ' . $posteditlink; } $postcomments = apply_filters('thematic_postfooter_postcomments',$postcomments); // Display permalink, comments link, and RSS on single posts $postconnect .= __('. Bookmark the ', 'thematic') . ''; $postconnect .= __('permalink', 'thematic') . '.'; if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) { /* Comments are open */ $postconnect .= ' ' . __('Post a comment', 'thematic') . ''; $postconnect .= __(' or leave a trackback: ', 'thematic'); $postconnect .= '' . __('Trackback URL', 'thematic') . '.'; } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) { /* Only trackbacks are open */ $postconnect .= __(' Comments are closed, but you can leave a trackback: ', 'thematic'); $postconnect .= '' . __('Trackback URL', 'thematic') . '.'; } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) { /* Only comments open */ $postconnect .= __(' Trackbacks are closed, but you can ', 'thematic'); $postconnect .= '' . __('post a comment', 'thematic') . '.'; } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) { /* 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 .= ' ' . $posteditlink; } $postconnect = apply_filters('thematic_postfooter_postconnect',$postconnect); // Add it all up if ($post->post_type == 'page' && current_user_can('edit_posts')) { /* For logged-in "page" search results */ $postfooter = '
' . '' . $posteditlink . ''; $postfooter .= "
\n"; } elseif ($post->post_type == 'page') { /* For logged-out "page" search results */ $postfooter = ''; } else { if (is_single()) { $postfooter = '
' . $postcategory . $posttags . $postconnect; } else { $postfooter = '
' . $postcategory . $posttags . $postcomments; } $postfooter .= "
\n"; } // Put it on the screen echo apply_filters( 'thematic_postfooter', $postfooter ); // Filter to override default post footer } // end thematic_postfooter // Action to create the below navigation function thematic_nav_below() { if (is_single()) { ?> '%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 ( strstr( $str, ">$current_cat<" ) ) { 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 ( strstr( $str, ">$current_tag<" ) ) { unset($tags[$i]); break; } } if ( empty($tags) ) return false; return trim(join( $glue, $tags )); } // end thematic_tag_ur_it // Add BuddyPress extensions require_once(THEMELIB . '/extensions/buddypress-extensions.php'); ?>