]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-content/themes/twentyten/functions.php
Wordpress 3.0.1
[autoinstalls/wordpress.git] / wp-content / themes / twentyten / functions.php
index 3a61e9d88170fa459720e45bd4057975f5c609ce..d7a127a21123c98d6bdfcdb5ec18c60a6da97ff6 100644 (file)
@@ -203,64 +203,6 @@ function twentyten_admin_header_style() {
 }
 endif;
 
-/**
- * Makes some changes to the <title> tag, by filtering the output of wp_title().
- *
- * If we have a site description and we're viewing the home page or a blog posts
- * page (when using a static front page), then we will add the site description.
- *
- * If we're viewing a search result, then we're going to recreate the title entirely.
- * We're going to add page numbers to all titles as well, to the middle of a search
- * result title and the end of all other titles.
- *
- * The site title also gets added to all titles.
- *
- * @since Twenty Ten 1.0
- *
- * @param string $title Title generated by wp_title()
- * @param string $separator The separator passed to wp_title(). Twenty Ten uses a
- *     vertical bar, "|", as a separator in header.php.
- * @return string The new title, ready for the <title> tag.
- */
-function twentyten_filter_wp_title( $title, $separator ) {
-       // Don't affect wp_title() calls in feeds.
-       if ( is_feed() )
-               return $title;
-
-       // The $paged global variable contains the page number of a listing of posts.
-       // The $page global variable contains the page number of a single post that is paged.
-       // We'll display whichever one applies, if we're not looking at the first page.
-       global $paged, $page;
-
-       if ( is_search() ) {
-               // If we're a search, let's start over:
-               $title = sprintf( __( 'Search results for %s', 'twentyten' ), '"' . get_search_query() . '"' );
-               // Add a page number if we're on page 2 or more:
-               if ( $paged >= 2 )
-                       $title .= " $separator " . sprintf( __( 'Page %s', 'twentyten' ), $paged );
-               // Add the site name to the end:
-               $title .= " $separator " . get_bloginfo( 'name', 'display' );
-               // We're done. Let's send the new title back to wp_title():
-               return $title;
-       }
-
-       // Otherwise, let's start by adding the site name to the end:
-       $title .= get_bloginfo( 'name', 'display' );
-
-       // If we have a site description and we're on the home/front page, add the description:
-       $site_description = get_bloginfo( 'description', 'display' );
-       if ( $site_description && ( is_home() || is_front_page() ) )
-               $title .= " $separator " . $site_description;
-
-       // Add a page number if necessary:
-       if ( $paged >= 2 || $page >= 2 )
-               $title .= " $separator " . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );
-
-       // Return the new title to wp_title():
-       return $title;
-}
-add_filter( 'wp_title', 'twentyten_filter_wp_title', 10, 2 );
-
 /**
  * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
  *