Make WordPress Core

Ticket #29127: 29127.twentytwelve.2.patch

File 29127.twentytwelve.2.patch, 5.3 KB (added by lancewillett, 10 years ago)

Second pass at Twenty Twelve cleanup

  • wp-content/themes/twentytwelve/author.php

     
    2929                        ?>
    3030
    3131                        <header class="archive-header">
    32                                 <h1 class="archive-title"><?php printf( __( 'Author Archives: %s', 'twentytwelve' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
     32                                <h1 class="archive-title"><?php printf( __( 'Author Archives: %s', 'twentytwelve' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
    3333                        </header><!-- .archive-header -->
    3434
    3535                        <?php
  • wp-content/themes/twentytwelve/functions.php

     
    279279function twentytwelve_content_nav( $html_id ) {
    280280        global $wp_query;
    281281
    282         $html_id = esc_attr( $html_id );
    283 
    284282        if ( $wp_query->max_num_pages > 1 ) : ?>
    285                 <nav id="<?php echo $html_id; ?>" class="navigation" role="navigation">
     283                <nav id="<?php echo esc_attr( $html_id ); ?>" class="navigation" role="navigation">
    286284                        <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>
    287285                        <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentytwelve' ) ); ?></div>
    288286                        <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?></div>
    289                 </nav><!-- #<?php echo $html_id; ?> .navigation -->
     287                </nav><!-- .navigation -->
    290288        <?php endif;
    291289}
    292290endif;
  • wp-content/themes/twentytwelve/header.php

     
    4646                </nav><!-- #site-navigation -->
    4747
    4848                <?php if ( get_header_image() ) : ?>
    49                 <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
     49                <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="" /></a>
    5050                <?php endif; ?>
    5151        </header><!-- #masthead -->
    5252
    53         <div id="main" class="wrapper">
    54  No newline at end of file
     53        <div id="main" class="wrapper">
  • wp-content/themes/twentytwelve/image.php

     
    6666                $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
    6767        else :
    6868                // or get the URL of the first image attachment
    69                 $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
     69                $next_attachment_url = get_attachment_link( $attachments[0]->ID );
    7070        endif;
    7171else :
    7272        // or, if there's only 1 image, get the URL of the image
  • wp-content/themes/twentytwelve/inc/custom-header.php

     
    147147 * @since Twenty Twelve 1.0
    148148 */
    149149function twentytwelve_admin_header_image() {
     150        $style = 'color: #' . get_header_textcolor() . ';';
     151        if ( ! display_header_text() )
     152                $style = 'display: none;';
    150153        ?>
    151154        <div id="headimg">
    152                 <?php
    153                 if ( ! display_header_text() )
    154                         $style = ' style="display:none;"';
    155                 else
    156                         $style = ' style="color:#' . get_header_textcolor() . ';"';
    157                 ?>
    158                 <h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
    159                 <h2 id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></h2>
     155                <h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( $style ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
     156                <h2 id="desc" class="displaying-header-text" style="<?php echo esc_attr( $style ); ?>"><?php bloginfo( 'description' ); ?></h2>
    160157                <?php $header_image = get_header_image();
    161158                if ( ! empty( $header_image ) ) : ?>
    162                         <img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
     159                        <img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="" />
    163160                <?php endif; ?>
    164161        </div>
    165 <?php }
    166  No newline at end of file
     162<?php }
     163