Changeset 31265
- Timestamp:
- 01/22/2015 12:41:36 AM (10 years ago)
- Location:
- trunk/src/wp-content/themes/twentyeleven
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyeleven/404.php
r25625 r31265 35 35 /* translators: %1$s: smilie */ 36 36 $archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'twentyeleven' ), convert_smilies( ':)' ) ) . '</p>'; 37 the_widget( 'WP_Widget_Archives', array( 'count' => 0 , 'dropdown' => 1 ), array( 'after_title' => '</h2>'.$archive_content ) );37 the_widget( 'WP_Widget_Archives', array( 'count' => 0, 'dropdown' => 1 ), array( 'after_title' => '</h2>' . $archive_content ) ); 38 38 ?> 39 39 -
trunk/src/wp-content/themes/twentyeleven/author.php
r25746 r31265 27 27 28 28 <header class="page-header"> 29 <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<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>29 <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<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> 30 30 </header> 31 31 -
trunk/src/wp-content/themes/twentyeleven/content-image.php
r25625 r31265 21 21 <?php if ( comments_open() && ! post_password_required() ) : ?> 22 22 <div class="comments-link"> 23 <?php comments_popup_link( '<span class="leave-reply">' . __( "Reply", 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?>23 <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?> 24 24 </div> 25 25 <?php endif; ?> -
trunk/src/wp-content/themes/twentyeleven/functions.php
r30351 r31265 331 331 <div id="headimg"> 332 332 <?php 333 $color = get_header_textcolor();334 $image = get_header_image();335 if ( $color && $color != 'blank' )336 $style = ' style="color:#' . $color . '"'; 337 else338 $style = ' style="display:none"'; 339 ?>340 <h1 class="displaying-header-text"><a id="name" <?php echo $style; ?>onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1>341 <div id="desc" class="displaying-header-text" <?php echo $style; ?>><?php bloginfo( 'description' ); ?></div>342 <?php if ( $image ) : ?>333 $color = get_header_textcolor(); 334 $image = get_header_image(); 335 $style = 'display: none;'; 336 if ( $color && $color != 'blank' ) { 337 $style = 'color: #' . $color . ';'; 338 } 339 ?> 340 <h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( $style ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1> 341 <div id="desc" class="displaying-header-text" style="<?php echo esc_attr( $style ); ?>"><?php bloginfo( 'description' ); ?></div> 342 <?php if ( $image ) : ?> 343 343 <img src="<?php echo esc_url( $image ); ?>" alt="" /> 344 344 <?php endif; ?> … … 447 447 'id' => 'sidebar-1', 448 448 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 449 'after_widget' => "</aside>",449 'after_widget' => '</aside>', 450 450 'before_title' => '<h3 class="widget-title">', 451 451 'after_title' => '</h3>', … … 457 457 'description' => __( 'The sidebar for the optional Showcase Template', 'twentyeleven' ), 458 458 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 459 'after_widget' => "</aside>",459 'after_widget' => '</aside>', 460 460 'before_title' => '<h3 class="widget-title">', 461 461 'after_title' => '</h3>', … … 467 467 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), 468 468 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 469 'after_widget' => "</aside>",469 'after_widget' => '</aside>', 470 470 'before_title' => '<h3 class="widget-title">', 471 471 'after_title' => '</h3>', … … 477 477 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), 478 478 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 479 'after_widget' => "</aside>",479 'after_widget' => '</aside>', 480 480 'before_title' => '<h3 class="widget-title">', 481 481 'after_title' => '</h3>', … … 487 487 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), 488 488 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 489 'after_widget' => "</aside>",489 'after_widget' => '</aside>', 490 490 'before_title' => '<h3 class="widget-title">', 491 491 'after_title' => '</h3>', … … 582 582 583 583 if ( $class ) 584 echo 'class="' . $class. '"';584 echo 'class="' . esc_attr( $class ) . '"'; 585 585 } 586 586 … … 718 718 $galleries = get_post_galleries( get_the_ID(), false ); 719 719 if ( isset( $galleries[0]['ids'] ) ) 720 720 $images = explode( ',', $galleries[0]['ids'] ); 721 721 } else { 722 722 $pattern = get_shortcode_regex(); -
trunk/src/wp-content/themes/twentyeleven/header.php
r29842 r31265 41 41 // Add a page number if necessary: 42 42 if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) 43 echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page) );43 echo esc_html( ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) ) ); 44 44 45 45 ?></title> … … 112 112 } 113 113 ?> 114 <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />114 <img src="<?php header_image(); ?>" width="<?php echo esc_attr( $header_image_width ); ?>" height="<?php echo esc_attr( $header_image_height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /> 115 115 <?php endif; // end check for featured image or standard header ?> 116 116 </a> -
trunk/src/wp-content/themes/twentyeleven/image.php
r28585 r31265 67 67 else 68 68 // 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 ); 70 70 } else { 71 71 // or, if there's only 1 image, get the URL of the image -
trunk/src/wp-content/themes/twentyeleven/inc/theme-options.php
r29903 r31265 219 219 220 220 if ( is_rtl() ) 221 221 $default_theme_options['theme_layout'] = 'sidebar-content'; 222 222 223 223 /** … … 278 278 <span> 279 279 <img src="<?php echo esc_url( $scheme['thumbnail'] ); ?>" width="136" height="122" alt="" /> 280 <?php echo $scheme['label']; ?>280 <?php echo esc_html( $scheme['label'] ); ?> 281 281 </span> 282 282 </label> … … 317 317 <span> 318 318 <img src="<?php echo esc_url( $layout['thumbnail'] ); ?>" width="136" height="122" alt="" /> 319 <?php echo $layout['label']; ?>319 <?php echo esc_html( $layout['label'] ); ?> 320 320 </span> 321 321 </label> … … 563 563 $choices = array(); 564 564 foreach ( $layouts as $layout ) { 565 $choices[ $layout['value']] = $layout['label'];565 $choices[ $layout['value'] ] = $layout['label']; 566 566 } 567 567 -
trunk/src/wp-content/themes/twentyeleven/inc/widgets.php
r27597 r31265 23 23 $this->alt_option_name = 'widget_twentyeleven_ephemera'; 24 24 25 add_action( 'save_post', array( &$this, 'flush_widget_cache' ) );26 add_action( 'deleted_post', array( &$this, 'flush_widget_cache' ) );27 add_action( 'switch_theme', array( &$this, 'flush_widget_cache' ) );25 add_action( 'save_post', array( &$this, 'flush_widget_cache' ) ); 26 add_action( 'deleted_post', array( &$this, 'flush_widget_cache' ) ); 27 add_action( 'switch_theme', array( &$this, 'flush_widget_cache' ) ); 28 28 } 29 29 … … 39 39 $cache = wp_cache_get( 'widget_twentyeleven_ephemera', 'widget' ); 40 40 41 if ( ! is_array( $cache ) )41 if ( ! is_array( $cache ) ) 42 42 $cache = array(); 43 43 … … 45 45 $args['widget_id'] = null; 46 46 47 if ( isset( $cache[ $args['widget_id']] ) ) {48 echo $cache[ $args['widget_id']];47 if ( isset( $cache[ $args['widget_id'] ] ) ) { 48 echo $cache[ $args['widget_id'] ]; 49 49 return; 50 50 } … … 54 54 55 55 /** This filter is documented in wp-includes/default-widgets.php */ 56 $ title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Ephemera', 'twentyeleven' ) : $instance['title'], $instance, $this->id_base);56 $args['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Ephemera', 'twentyeleven' ) : $instance['title'], $instance, $this->id_base ); 57 57 58 58 if ( ! isset( $instance['number'] ) ) 59 59 $instance['number'] = '10'; 60 60 61 if ( ! $ number= absint( $instance['number'] ) )62 $number= 10;61 if ( ! $args['number'] = absint( $instance['number'] ) ) 62 $args['number'] = 10; 63 63 64 64 $ephemera_args = array( 65 'order' => 'DESC',66 'posts_per_page' => $ number,67 'no_found_rows' => true,68 'post_status' => 'publish',69 'post__not_in' => get_option( 'sticky_posts' ),70 'tax_query' => array(65 'order' => 'DESC', 66 'posts_per_page' => $args['number'], 67 'no_found_rows' => true, 68 'post_status' => 'publish', 69 'post__not_in' => get_option( 'sticky_posts' ), 70 'tax_query' => array( 71 71 array( 72 72 'taxonomy' => 'post_format', 73 'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-status', 'post-format-quote' ),74 'field' => 'slug',73 'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-status', 'post-format-quote' ), 74 'field' => 'slug', 75 75 'operator' => 'IN', 76 76 ), … … 80 80 81 81 if ( $ephemera->have_posts() ) : 82 echo $ before_widget;83 echo $ before_title;84 echo $ title; // Can set this with a widget option, or omit altogether85 echo $a fter_title;82 echo $args['before_widget']; 83 echo $args['before_title']; 84 echo $args['title']; 85 echo $args['after_title']; 86 86 ?> 87 87 <ol> … … 112 112 <?php 113 113 114 echo $a fter_widget;114 echo $args['after_widget']; 115 115 116 116 // Reset the post globals as this query will have stomped on it … … 120 120 endif; 121 121 122 $cache[ $args['widget_id']] = ob_get_flush();122 $cache[ $args['widget_id'] ] = ob_get_flush(); 123 123 wp_cache_set( 'widget_twentyeleven_ephemera', $cache, 'widget' ); 124 124 } -
trunk/src/wp-content/themes/twentyeleven/showcase.php
r25746 r31265 106 106 ?> 107 107 108 <section class="featured-post <?php echo $feature_class; ?>" id="featured-post-<?php echo $counter_slider; ?>">108 <section class="featured-post <?php echo esc_attr( $feature_class ); ?>" id="featured-post-<?php echo esc_attr( $counter_slider ); ?>"> 109 109 110 110 <?php … … 136 136 137 137 // Reset the counter so that we end up with matching elements 138 138 $counter_slider = 0; 139 139 140 140 // Begin from zero 141 141 rewind_posts(); 142 142 143 143 // Let's roll again. 144 145 144 while ( $featured->have_posts() ) : $featured->the_post(); 145 $counter_slider++; 146 146 if ( 1 == $counter_slider ) 147 $class = ' class="active"';147 $class = ' class="active"'; 148 148 else 149 149 $class = ''; 150 151 <li><a href="#featured-post-<?php echo $counter_slider; ?>" title="<?php echo esc_attr( sprintf( __( 'Featuring: %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>"<?php echo $class; ?>></a></li>150 ?> 151 <li><a href="#featured-post-<?php echo esc_attr( $counter_slider ); ?>" title="<?php echo esc_attr( sprintf( __( 'Featuring: %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>"<?php echo $class; ?>></a></li> 152 152 <?php endwhile; ?> 153 153 </ul>
Note: See TracChangeset
for help on using the changeset viewer.