Make WordPress Core

Changeset 19582


Ignore:
Timestamp:
12/10/2011 07:18:51 PM (12 years ago)
Author:
ryan
Message:

More consistent attribute escaping. Props nacin.

Location:
trunk/wp-content/themes
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyeleven/content-image.php

    r19375 r19582  
    3737                        get_the_date(),
    3838                        esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    39                         sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
     39                        esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
    4040                        get_the_author()
    4141                    );
  • trunk/wp-content/themes/twentyeleven/content-single.php

    r18385 r19582  
    5858            </div><!-- #author-avatar -->
    5959            <div id="author-description">
    60                 <h2><?php printf( esc_attr__( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
     60                <h2><?php printf( __( 'About %s', 'twentyeleven' ), get_the_author() ); ?></h2>
    6161                <?php the_author_meta( 'description' ); ?>
    6262                <div id="author-link">
  • trunk/wp-content/themes/twentyeleven/functions.php

    r19289 r19582  
    568568        esc_html( get_the_date() ),
    569569        esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    570         sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
    571         esc_html( get_the_author() )
     570        esc_attr( sprintf( __( 'View all posts by %s', 'twentyeleven' ), get_the_author() ) ),
     571        get_the_author()
    572572    );
    573573}
     
    583583function twentyeleven_body_classes( $classes ) {
    584584
    585     if ( ! is_multi_author() ) {
     585    if ( function_exists( 'is_multi_author' ) && ! is_multi_author() )
    586586        $classes[] = 'single-author';
    587     }
    588587
    589588    if ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) )
  • trunk/wp-content/themes/twentyeleven/image.php

    r19379 r19582  
    2828                                <?php
    2929                                    $metadata = wp_get_attachment_metadata();
    30                                     printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', 'twentyeleven' ),
     30                                    printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>', 'twentyeleven' ),
    3131                                        esc_attr( get_the_time() ),
    3232                                        get_the_date(),
     
    3535                                        $metadata['height'],
    3636                                        esc_url( get_permalink( $post->post_parent ) ),
     37                                        esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ),
    3738                                        get_the_title( $post->post_parent )
    3839                                    );
     
    7172    }
    7273?>
    73                                     <a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
     74                                    <a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
    7475                                    $attachment_size = apply_filters( 'twentyeleven_attachment_size', 848 );
    7576                                    echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height.
  • trunk/wp-content/themes/twentyeleven/style.css

    r19543 r19582  
    55Author URI: http://wordpress.org/
    66Description: The 2011 theme for WordPress is sophisticated, lightweight, and adaptable. Make it yours with a custom menu, header image, and background -- then go further with available theme options for light or dark color scheme, custom link colors, and three layout choices. Twenty Eleven comes equipped with a Showcase page template that transforms your front page into a showcase to show off your best content, widget support galore (sidebar, three footer areas, and a Showcase page widget area), and a custom "Ephemera" widget to display your Aside, Link, Quote, or Status posts. Included are styles for print and for the admin editor, support for featured images (as custom header images on posts and pages and as large images on featured "sticky" posts), and special styles for six different post formats.
    7 Version: 1.2
     7Version: 1.3
    88License: GNU General Public License
    99License URI: license.txt
  • trunk/wp-content/themes/twentyten/functions.php

    r19058 r19582  
    474474        sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
    475475            get_author_posts_url( get_the_author_meta( 'ID' ) ),
    476             sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
     476            esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_author() ) ),
    477477            get_the_author()
    478478        )
  • trunk/wp-content/themes/twentyten/loop-attachment.php

    r18189 r19582  
    1919
    2020                <?php if ( ! empty( $post->post_parent ) ) : ?>
    21                     <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
     21                    <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php echo esc_attr( sprintf( __( 'Return to %s', 'twentyten' ), strip_tags( get_the_title( $post->post_parent ) ) ) ); ?>" rel="gallery"><?php
    2222                        /* translators: %s - title of parent post */
    2323                        printf( __( '<span class="meta-nav">&larr;</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
     
    3434                                sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
    3535                                    get_author_posts_url( get_the_author_meta( 'ID' ) ),
    36                                     sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
     36                                    esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_author() ) ),
    3737                                    get_the_author()
    3838                                )
     
    8686    }
    8787?>
    88                         <p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
     88                        <p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
    8989                            $attachment_width  = apply_filters( 'twentyten_attachment_size', 900 );
    9090                            $attachment_height = apply_filters( 'twentyten_attachment_height', 900 );
     
    9797                        </div><!-- #nav-below -->
    9898<?php else : ?>
    99                         <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
     99                        <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
    100100<?php endif; ?>
    101101                        </div><!-- .entry-attachment -->
  • trunk/wp-content/themes/twentyten/loop-single.php

    r18189 r19582  
    4141                        </div><!-- #author-avatar -->
    4242                        <div id="author-description">
    43                             <h2><?php printf( esc_attr__( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
     43                            <h2><?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?></h2>
    4444                            <?php the_author_meta( 'description' ); ?>
    4545                            <div id="author-link">
  • trunk/wp-content/themes/twentyten/style.css

    r19300 r19582  
    44Description: The 2010 theme for WordPress is stylish, customizable, simple, and readable -- make it yours with a custom menu, header image, and background. Twenty Ten supports six widgetized areas (two in the sidebar, four in the footer) and featured images (thumbnails for gallery posts and custom header images for posts and pages). It includes stylesheets for print and the admin Visual Editor, special styles for posts in the "Asides" and "Gallery" categories, and has an optional one-column page template that removes the sidebar.
    55Author: the WordPress team
    6 Version: 1.2
     6Version: 1.3
    77License: GNU General Public License
    88License URI: license.txt
Note: See TracChangeset for help on using the changeset viewer.