diff --git a/wp-content/themes/twentyeleven/functions.php b/wp-content/themes/twentyeleven/functions.php index 146dea174c..1d8385dd47 100644 --- a/wp-content/themes/twentyeleven/functions.php +++ b/wp-content/themes/twentyeleven/functions.php @@ -326,27 +326,6 @@ function twentyeleven_admin_header_image() { ?> = 2 || $page >= 2 ) - $title = "$title $sep " . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) ); - - return $title; -} -add_filter( 'wp_title', 'twentyeleven_wp_title', 10, 2 ); diff --git a/wp-content/themes/twentyeleven/header.php b/wp-content/themes/twentyeleven/header.php index 81bb506d84..59b6d3b140 100644 --- a/wp-content/themes/twentyeleven/header.php +++ b/wp-content/themes/twentyeleven/header.php @@ -24,13 +24,40 @@ -<?php wp_title( '|', true, 'right' ); ?> +<?php + /* + * Print the <title> tag based on what is being viewed. + */ + global $page, $paged; + + wp_title( '|', true, 'right' ); + + // Add the blog name. + bloginfo( 'name' ); + + // Add the blog description for the home/front page. + $site_description = get_bloginfo( 'description', 'display' ); + if ( $site_description && ( is_home() || is_front_page() ) ) + echo " | $site_description"; + + // Add a page number if necessary: + if ( $paged >= 2 || $page >= 2 ) + echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) ); + + ?> + * tag of your theme, or you will break many plugins, which * generally use this hook to add elements to such diff --git a/wp-content/themes/twentyten/functions.php b/wp-content/themes/twentyten/functions.php index 77d7b0a11a..ea5f8c5244 100644 --- a/wp-content/themes/twentyten/functions.php +++ b/wp-content/themes/twentyten/functions.php @@ -215,27 +215,6 @@ function twentyten_admin_header_style() { } endif; -/** - * Enqueue scripts and styles. - * - * Hooked on priority 0 to make sure they are enqueued prior to dependent - * scripts/styles. This is only necessary because they were previously enqueued - * prior to wp_head() running, and we want to provide maximum - * backwards compatibility. - * - * @since Twenty Ten 1.6 - */ -function twentyten_scripts() { - wp_enqueue_style( 'twentyten', get_stylesheet_uri() ); - - /* We add some JavaScript to pages with the comment form - * to support sites with threaded comments (when in use). - */ - if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) - wp_enqueue_script( 'comment-reply' ); -} -add_action( 'wp_enqueue_scripts', 'twentyten_scripts', 0 ); - /** * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. * @@ -535,35 +514,3 @@ function twentyten_posted_in() { ); } endif; - -/** - * Creates a nicely formatted and more specific title element text - * for output in head of document, based on current view. - * - * @since Twenty Ten 1.6 - * - * @param string $title Default title text for current view. - * @param string $sep Optional separator. - * @return string Filtered title. - */ -function twentyten_wp_title( $title, $sep ) { - global $paged, $page; - - if ( is_feed() ) - return $title; - - // Add the site name. - $title .= get_bloginfo( 'name' ); - - // Add the site description for the home/front page. - $site_description = get_bloginfo( 'description', 'display' ); - if ( $site_description && ( is_home() || is_front_page() ) ) - $title = "$title $sep $site_description"; - - // Add a page number if necessary. - if ( $paged >= 2 || $page >= 2 ) - $title = "$title $sep " . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) ); - - return $title; -} -add_filter( 'wp_title', 'twentyten_wp_title', 10, 2 ); diff --git a/wp-content/themes/twentyten/header.php b/wp-content/themes/twentyten/header.php index f45c34b02b..50cb37589d 100644 --- a/wp-content/themes/twentyten/header.php +++ b/wp-content/themes/twentyten/header.php @@ -12,10 +12,37 @@ > -<?php wp_title( '|', true, 'right' ); ?> +<?php + /* + * Print the <title> tag based on what is being viewed. + */ + global $page, $paged; + + wp_title( '|', true, 'right' ); + + // Add the blog name. + bloginfo( 'name' ); + + // Add the blog description for the home/front page. + $site_description = get_bloginfo( 'description', 'display' ); + if ( $site_description && ( is_home() || is_front_page() ) ) + echo " | $site_description"; + + // Add a page number if necessary: + if ( $paged >= 2 || $page >= 2 ) + echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) ); + + ?> + * tag of your theme, or you will break many plugins, which * generally use this hook to add elements to such