From f7c2b55c6d2668d6dff76696c39eb87aa3764104 Mon Sep 17 00:00:00 2001 From: Nikolay Bachiyski Date: Mon, 10 May 2010 05:58:24 +0000 Subject: [PATCH] I18n and whitespace fixes for functions.php in TwentyTen git-svn-id: https://develop.svn.wordpress.org/trunk@14534 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-content/themes/twentyten/functions.php | 69 ++++++++++++++--------- 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/wp-content/themes/twentyten/functions.php b/wp-content/themes/twentyten/functions.php index 06702a4c20..58bf9c7960 100644 --- a/wp-content/themes/twentyten/functions.php +++ b/wp-content/themes/twentyten/functions.php @@ -50,7 +50,7 @@ if ( ! isset( $content_width ) ) /** Tell WordPress to run twentyten_setup() when the 'after_setup_theme' hook is run. */ add_action( 'after_setup_theme', 'twentyten_setup' ); -if ( ! function_exists('twentyten_setup') ): +if ( ! function_exists( 'twentyten_setup' ) ): /** * Sets up theme defaults and registers support for various WordPress features. * @@ -121,45 +121,53 @@ function twentyten_setup() { // ... and thus ends the changeable header business. // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. - register_default_headers( array ( - 'berries' => array ( + register_default_headers( array( + 'berries' => array( 'url' => '%s/images/headers/berries.jpg', 'thumbnail_url' => '%s/images/headers/berries-thumbnail.jpg', + /* translators: header image description */ 'description' => __( 'Berries', 'twentyten' ) ), - 'cherryblossom' => array ( + 'cherryblossom' => array( 'url' => '%s/images/headers/cherryblossoms.jpg', 'thumbnail_url' => '%s/images/headers/cherryblossoms-thumbnail.jpg', + /* translators: header image description */ 'description' => __( 'Cherry Blossoms', 'twentyten' ) ), - 'concave' => array ( + 'concave' => array( 'url' => '%s/images/headers/concave.jpg', 'thumbnail_url' => '%s/images/headers/concave-thumbnail.jpg', + /* translators: header image description */ 'description' => __( 'Concave', 'twentyten' ) ), - 'fern' => array ( + 'fern' => array( 'url' => '%s/images/headers/fern.jpg', 'thumbnail_url' => '%s/images/headers/fern-thumbnail.jpg', + /* translators: header image description */ 'description' => __( 'Fern', 'twentyten' ) ), - 'forestfloor' => array ( + 'forestfloor' => array( 'url' => '%s/images/headers/forestfloor.jpg', 'thumbnail_url' => '%s/images/headers/forestfloor-thumbnail.jpg', + /* translators: header image description */ 'description' => __( 'Forest Floor', 'twentyten' ) ), - 'inkwell' => array ( + 'inkwell' => array( 'url' => '%s/images/headers/inkwell.jpg', 'thumbnail_url' => '%s/images/headers/inkwell-thumbnail.jpg', + /* translators: header image description */ 'description' => __( 'Inkwell', 'twentyten' ) ), - 'path' => array ( + 'path' => array( 'url' => '%s/images/headers/path.jpg', 'thumbnail_url' => '%s/images/headers/path-thumbnail.jpg', + /* translators: header image description */ 'description' => __( 'Path', 'twentyten' ) ), - 'sunset' => array ( + 'sunset' => array( 'url' => '%s/images/headers/sunset.jpg', 'thumbnail_url' => '%s/images/headers/sunset-thumbnail.jpg', + /* translators: header image description */ 'description' => __( 'Sunset', 'twentyten' ) ) ) ); @@ -200,7 +208,7 @@ if ( ! function_exists( 'twentyten_the_page_number' ) ) : function twentyten_the_page_number() { global $paged; // Contains page number. if ( $paged >= 2 ) - echo ' | ' . sprintf( __( 'Page %s' , 'twentyten' ), $paged ); + echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), $paged ); } endif; @@ -266,20 +274,25 @@ if ( ! function_exists( 'twentyten_comment' ) ) : * @since 3.0.0 */ function twentyten_comment( $comment, $args, $depth ) { - $GLOBALS ['comment'] = $comment; ?> + $GLOBALS['comment'] = $comment; ?> comment_type ) : ?>
  • id="li-comment-">
    - %s says:', 'twentyten' ), get_comment_author_link() ); ?> + says:', 'twentyten' ), sprintf( '%s', get_comment_author_link() ) ); ?>
    comment_approved == '0' ) : ?>
    - +
    @@ -290,7 +303,7 @@ function twentyten_comment( $comment, $args, $depth ) {
  • -

    +

    __( 'Primary Widget Area', 'twentyten' ), 'id' => 'primary-widget-area', 'description' => __( 'The primary widget area', 'twentyten' ), 'before_widget' => '
  • ', - 'after_widget' => "
  • ", + 'after_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 2 - register_sidebar( array ( + register_sidebar( array( 'name' => __( 'Secondary Widget Area', 'twentyten' ), 'id' => 'secondary-widget-area', 'description' => __( 'The secondary widget area', 'twentyten' ), 'before_widget' => '
  • ', - 'after_widget' => "
  • ", + 'after_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 3 - register_sidebar( array ( + register_sidebar( array( 'name' => __( 'First Footer Widget Area', 'twentyten' ), 'id' => 'first-footer-widget-area', 'description' => __( 'The first footer widget area', 'twentyten' ), 'before_widget' => '
  • ', - 'after_widget' => "
  • ", + 'after_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 4 - register_sidebar( array ( + register_sidebar( array( 'name' => __( 'Second Footer Widget Area', 'twentyten' ), 'id' => 'second-footer-widget-area', 'description' => __( 'The second footer widget area', 'twentyten' ), 'before_widget' => '
  • ', - 'after_widget' => "
  • ", + 'after_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 5 - register_sidebar( array ( + register_sidebar( array( 'name' => __( 'Third Footer Widget Area', 'twentyten' ), 'id' => 'third-footer-widget-area', 'description' => __( 'The third footer widget area', 'twentyten' ), 'before_widget' => '
  • ', - 'after_widget' => "
  • ", + 'after_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ', ) ); // Area 6 - register_sidebar( array ( + register_sidebar( array( 'name' => __( 'Fourth Footer Widget Area', 'twentyten' ), 'id' => 'fourth-footer-widget-area', 'description' => __( 'The fourth footer widget area', 'twentyten' ), 'before_widget' => '
  • ', - 'after_widget' => "
  • ", + 'after_widget' => '', 'before_title' => '

    ', 'after_title' => '

    ', ) ); @@ -385,7 +398,7 @@ add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' ); */ function twentyten_get_next_attachment_url() { global $post; - $post = get_post($post); + $post = get_post( $post ); $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); foreach ( $attachments as $k => $attachment ) {