Index: wp-content/themes/twentyten/functions.php
===================================================================
--- wp-content/themes/twentyten/functions.php (revision 13142)
+++ wp-content/themes/twentyten/functions.php (working copy)
@@ -3,6 +3,9 @@
// Set the content width based on the Theme CSS
$content_width = apply_filters( 'twentyten_content_width', 640 );
+// Enables automatic general feed link outputting
+automatic_feed_links();
+
// Your Changeable header business starts here
// No CSS, just IMG call
define( 'HEADER_TEXTCOLOR', '');
@@ -46,10 +49,29 @@
if ( is_readable($locale_file) )
require_once( $locale_file );
+// Gets the correct document title for the page
+function twentyten_title( $sep = '|' ) {
+ if ( is_single() ) {
+ $title = sprintf( '%1$s %2$s %3$s', single_post_title( '', false ), $sep, get_bloginfo( 'name' ) );
+ } elseif ( is_home() || is_front_page() ) {
+ $title = sprintf( '%1$s %2$s %3$s %4$s', get_bloginfo( 'name' ), $sep, get_bloginfo( 'description' ), twentyten_get_page_number($sep) );
+ } elseif ( is_page() ) {
+ $title = sprintf( '%1$s %2$s %3$s', single_post_title( '', false ), $sep, get_bloginfo( 'name' ) );
+ } elseif ( is_search() ) {
+ $title = sprintf( __('Search results for "%1$s" | %2$s %3$s', 'twentyten'), esc_attr(get_search_query()), twentyten_get_page_number($sep), get_bloginfo('name') );
+ } elseif ( is_404() ) {
+ $title = sprintf( __( 'Not Found %1$s %2$s', 'twentyten' ), $sep, get_bloginfo( 'name' ) );
+ } else {
+ $title = sprintf( '%1$s | %2$s %3$s', wp_title(''), get_bloginfo('name'), twentyten_get_page_number($sep) );
+ }
+
+ echo apply_filters( 'twentyten_title', $title );
+}
+
// Get the page number
-function twentyten_get_page_number() {
+function twentyten_get_page_number( $sep = '|' ) {
if ( get_query_var('paged') )
- echo ' | ' . __( 'Page ' , 'twentyten' ) . get_query_var('paged');
+ return apply_filters( 'twentyten_get_page_number', sprintf( __( ' %s Page ' , 'twentyten' ), $sep, get_query_var('paged') ) );
}
// Control excerpt length
@@ -116,41 +138,11 @@
add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );
-// For category lists on category archives: Returns other categories except the current one (redundant)
-function 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;
+// Loads the loop.php template
+function twentyten_get_loop_template() {
+ locate_template( 'loop', true );
+}
- return trim( join( $glue, $cats ) );
-} // end cats_meow
-
-
-// For tag lists on tag archives: Returns other tags except the current one (redundant)
-function 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 tag_ur_it
-
// Register widgetized areas
function twentyten_widgets_init() {
// Area 1
Index: wp-content/themes/twentyten/tag.php
===================================================================
--- wp-content/themes/twentyten/tag.php (revision 13142)
+++ wp-content/themes/twentyten/tag.php (working copy)
@@ -9,7 +9,7 @@
-
+