From c43b5bc26bd324933b96d77981b269a2b1ce0cfd Mon Sep 17 00:00:00 2001 From: nacin Date: Mon, 12 Jul 2010 19:40:21 +0000 Subject: [PATCH] Update to Twenty Ten 1.0.3 from theme dir. see #14284. git-svn-id: http://svn.automattic.com/wordpress/trunk@15392 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyten/attachment.php | 10 ++-- wp-content/themes/twentyten/editor-style.css | 8 +-- wp-content/themes/twentyten/functions.php | 58 -------------------- wp-content/themes/twentyten/header.php | 16 +++++- wp-content/themes/twentyten/loop.php | 33 +++++------ wp-content/themes/twentyten/style.css | 1 - 6 files changed, 41 insertions(+), 85 deletions(-) diff --git a/wp-content/themes/twentyten/attachment.php b/wp-content/themes/twentyten/attachment.php index 262f63ee6..c35f4c8d7 100644 --- a/wp-content/themes/twentyten/attachment.php +++ b/wp-content/themes/twentyten/attachment.php @@ -14,10 +14,12 @@ get_header(); ?> -

← %s', 'twentyten' ), get_the_title( $post->post_parent ) ); - ?>

+ post_parent ) ) : ?> +

← %s', 'twentyten' ), get_the_title( $post->post_parent ) ); + ?>

+
>

diff --git a/wp-content/themes/twentyten/editor-style.css b/wp-content/themes/twentyten/editor-style.css index fa875cadb..31ea0d5b2 100644 --- a/wp-content/themes/twentyten/editor-style.css +++ b/wp-content/themes/twentyten/editor-style.css @@ -39,7 +39,7 @@ body, input, textarea { line-height: 18px; } hr { - background-color: #E7E7E7; + background-color: #e7e7e7; border:0; height: 1px; margin-bottom: 18px; @@ -95,7 +95,7 @@ big { font-size: 131.25%; } ins { - background: #FFFFCC; + background: #ffffcc; border: none; color: #333; } @@ -142,14 +142,14 @@ sub { top: .5ex; } a:link { - color:#0066CC; + color:#0066cc; } a:visited { color:#743399; } a:active, a:hover { - color: #FF4B33; + color: #ff4b33; } p, ul, diff --git a/wp-content/themes/twentyten/functions.php b/wp-content/themes/twentyten/functions.php index 3a61e9d88..d7a127a21 100644 --- a/wp-content/themes/twentyten/functions.php +++ b/wp-content/themes/twentyten/functions.php @@ -203,64 +203,6 @@ function twentyten_admin_header_style() { } endif; -/** - * Makes some changes to the 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. * diff --git a/wp-content/themes/twentyten/header.php b/wp-content/themes/twentyten/header.php index fbd248605..fa4b72791 100644 --- a/wp-content/themes/twentyten/header.php +++ b/wp-content/themes/twentyten/header.php @@ -15,11 +15,23 @@ <title><?php /* * Print the <title> tag based on what is being viewed. - * We filter the output of wp_title() a bit -- see - * twentyten_filter_wp_title() in functions.php. */ + 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 ) ); + ?> diff --git a/wp-content/themes/twentyten/loop.php b/wp-content/themes/twentyten/loop.php index 84c167dc4..c0d746f33 100644 --- a/wp-content/themes/twentyten/loop.php +++ b/wp-content/themes/twentyten/loop.php @@ -68,22 +68,23 @@
- - -

%2$s photos.', 'twentyten' ), - 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', - $total_images - ); ?>

- - + + $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); + if ( $images ) : + $total_images = count( $images ); + $image = array_shift( $images ); + $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); + ?> + +

%2$s photos.', 'twentyten' ), + 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', + $total_images + ); ?>

+ +
diff --git a/wp-content/themes/twentyten/style.css b/wp-content/themes/twentyten/style.css index 71a129e7e..a91c1dd61 100644 --- a/wp-content/themes/twentyten/style.css +++ b/wp-content/themes/twentyten/style.css @@ -7,7 +7,6 @@ Version: 1.0 Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style */ - /* Reset default browser CSS. Based on work by Eric Meyer: http://meyerweb.com/eric/tools/css/reset/index.html -------------------------------------------------------------- */