Changeset 17714
- Timestamp:
- 04/26/2011 06:34:52 PM (15 years ago)
- Location:
- trunk/wp-content/themes/twentyeleven
- Files:
-
- 12 edited
-
author.php (modified) (1 diff)
-
content-gallery.php (modified) (2 diffs)
-
content-link.php (modified) (1 diff)
-
content-single.php (modified) (2 diffs)
-
content.php (modified) (2 diffs)
-
footer.php (modified) (4 diffs)
-
functions.php (modified) (8 diffs)
-
header.php (modified) (1 diff)
-
image.php (modified) (2 diffs)
-
showcase.php (modified) (7 diffs)
-
sidebar.php (modified) (1 diff)
-
widgets.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyeleven/author.php
r17669 r17714 32 32 </div><!-- #author-description --> 33 33 </div><!-- #entry-author-info --> 34 <?php endif; ?> 34 <?php endif; ?> 35 35 36 36 <?php /* Start the Loop */ ?> -
trunk/wp-content/themes/twentyeleven/content-gallery.php
r17669 r17714 32 32 <?php if ( post_password_required() ) : ?> 33 33 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyeleven' ) ); ?> 34 34 35 35 <?php else : ?> 36 36 <?php … … 45 45 <a href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> 46 46 </figure><!-- .gallery-thumb --> 47 47 48 48 <p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, 'twentyeleven' ), 49 49 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', -
trunk/wp-content/themes/twentyeleven/content-link.php
r17669 r17714 12 12 <?php if ( 'post' == $post->post_type ) : ?> 13 13 <?php endif; ?> 14 14 15 15 <?php if ( comments_open() ) : ?> 16 16 <div class="comments-link"> -
trunk/wp-content/themes/twentyeleven/content-single.php
r17669 r17714 29 29 </div><!-- .entry-content --> 30 30 31 <footer class="entry-meta"> 31 <footer class="entry-meta"> 32 32 <?php 33 33 $tag_list = get_the_tag_list( '', ', ' ); … … 48 48 ?> 49 49 <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> 50 50 51 51 <?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?> 52 52 <div id="author-info"> -
trunk/wp-content/themes/twentyeleven/content.php
r17669 r17714 24 24 </div><!-- .entry-meta --> 25 25 <?php endif; ?> 26 26 27 27 <?php if ( comments_open() ) : ?> 28 28 <div class="comments-link"> … … 48 48 <?php the_tags( '<span class="sep"> | </span><span class="tag-links">' . __( 'Tagged ', 'twentyeleven' ) . '</span>', ', ', '' ); ?> 49 49 <?php endif; ?> 50 50 51 51 <?php if ( comments_open() ) : ?> 52 52 <span class="sep"> | </span> 53 53 <span class="comments-link"><?php comments_popup_link( __( '<span class="leave-reply">Leave a reply</span>', 'twentyeleven' ), __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span> 54 54 <?php endif; ?> 55 55 56 56 <?php edit_post_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?> 57 57 </footer><!-- #entry-meta --> -
trunk/wp-content/themes/twentyeleven/footer.php
r17669 r17714 9 9 10 10 <footer id="colophon" role="contentinfo"> 11 11 12 12 <?php if ( is_active_sidebar( 'sidebar-3' ) || is_active_sidebar( 'sidebar-4' ) || is_active_sidebar( 'sidebar-5' ) ) : ?> 13 13 <div id="supplementary" <?php twentyeleven_footer_sidebar_class(); ?>> … … 16 16 <?php dynamic_sidebar( 'sidebar-3' ); ?> 17 17 </div><!-- #first .widget-area --> 18 <?php endif; ?> 18 <?php endif; ?> 19 19 20 20 <?php if ( is_active_sidebar( 'sidebar-4' ) ) : ?> … … 22 22 <?php dynamic_sidebar( 'sidebar-4' ); ?> 23 23 </div><!-- #second .widget-area --> 24 <?php endif; ?> 24 <?php endif; ?> 25 25 26 26 <?php if ( is_active_sidebar( 'sidebar-5' ) ) : ?> … … 28 28 <?php dynamic_sidebar( 'sidebar-5' ); ?> 29 29 </div><!-- #third .widget-area --> 30 <?php endif; ?> 30 <?php endif; ?> 31 31 </div><!-- #supplementary --> 32 32 <?php endif; ?> 33 33 34 34 <div id="site-generator"> 35 35 <a href="http://wordpress.org/" rel="generator">Proudly powered by WordPress</a><span class="sep"> | </span><?php printf( __( 'Theme: %1$s.', 'twentyeleven' ), 'Twenty Eleven' ); ?> -
trunk/wp-content/themes/twentyeleven/functions.php
r17669 r17714 286 286 'after_title' => '</h1>', 287 287 ) ); 288 288 289 289 register_sidebar( array( 290 290 'name' => __( 'Footer Area Two', 'twentyeleven' ), … … 296 296 'after_title' => '</h1>', 297 297 ) ); 298 298 299 299 register_sidebar( array( 300 300 'name' => __( 'Footer Area Three', 'twentyeleven' ), … … 306 306 'after_title' => '</h1>', 307 307 ) ); 308 309 308 } 310 309 add_action( 'init', 'twentyeleven_widgets_init' ); … … 356 355 function twentyeleven_footer_sidebar_class() { 357 356 $count = 0; 358 357 359 358 if ( is_active_sidebar( 'sidebar-3' ) ) 360 359 $count++; … … 365 364 if ( is_active_sidebar( 'sidebar-5' ) ) 366 365 $count++; 367 366 368 367 switch ( $count ) { 369 368 case '1': … … 378 377 $class = 'three'; 379 378 break; 380 379 381 380 default: 382 381 $class = ''; 383 382 break; 384 383 } 385 384 386 385 if ( '' != $class ) 387 386 echo 'class="' . $class . '"'; … … 412 411 if ( '0' != $comment->comment_parent ) 413 412 $avatar_size = 39; 414 413 415 414 echo get_avatar( $comment, $avatar_size ); 416 415 417 416 printf( __( '%1$s on %2$s%3$s at %4$s%5$s <span class="says">said:</span>', 'twentyeleven' ), 418 417 sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ), … … 420 419 get_comment_date(), 421 420 get_comment_time(), 422 '</time></a>' 421 '</time></a>' 423 422 ); 424 423 ?> 425 426 <?php edit_comment_link( __( '[Edit]', 'twentyeleven' ), ' ' ); ?> 424 425 <?php edit_comment_link( __( '[Edit]', 'twentyeleven' ), ' ' ); ?> 427 426 </div><!-- .comment-author .vcard --> 428 427 -
trunk/wp-content/themes/twentyeleven/header.php
r17671 r17714 53 53 <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2> 54 54 </hgroup> 55 55 56 56 <?php 57 57 // Check to see if the header image has been removed -
trunk/wp-content/themes/twentyeleven/image.php
r17669 r17714 11 11 12 12 <?php the_post(); ?> 13 13 14 14 <nav id="nav-single"> 15 15 <span class="nav-previous"><?php previous_image_link( false, __( '← Previous' , 'twentyeleven' ) ); ?></span> 16 16 <span class="nav-next"><?php next_image_link( false, __( 'Next →' , 'twentyeleven' ) ); ?></span> 17 </nav><!-- #nav-single --> 17 </nav><!-- #nav-single --> 18 18 19 19 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> … … 71 71 echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // filterable image width with 1024px limit for image height. 72 72 ?></a> 73 73 74 74 <?php if ( ! empty( $post->post_excerpt ) ) : ?> 75 75 <div class="entry-caption"> 76 76 <?php the_excerpt(); ?> 77 77 </div> 78 <?php endif; ?> 78 <?php endif; ?> 79 79 </div><!-- .attachment --> 80 80 -
trunk/wp-content/themes/twentyeleven/showcase.php
r17670 r17714 12 12 <div id="primary" class="showcase"> 13 13 <div id="content" role="main"> 14 14 15 15 <?php the_post(); ?> 16 16 17 17 <?php 18 18 // If we have content for this page, let's display it. … … 20 20 get_template_part( 'content', 'intro' ); 21 21 ?> 22 22 23 23 <?php 24 24 // See if we have any sticky posts and use the latest to create a featured post … … 28 28 'post__in' => $sticky, 29 29 ); 30 30 31 31 $featured = new WP_Query(); 32 32 $featured->query( $featured_args ); 33 33 34 34 // Let's roll. 35 35 if ( $sticky ) : 36 36 37 37 $featured->the_post(); 38 38 39 39 // We're going to add a class to our featured post for featured images 40 40 // by default it'll have no class though … … 55 55 } 56 56 ?> 57 57 58 58 <?php if ( has_post_thumbnail() ) : ?> 59 59 <section class="featured-post <?php echo $feature_class; ?>"> … … 70 70 <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_post_thumbnail( 'small-feature' ); ?></a> 71 71 <?php } 72 } 73 ?> 72 } 73 ?> 74 74 <?php get_template_part( 'content', 'featured' ); ?> 75 </section> 75 </section> 76 76 <?php endif; ?> 77 77 78 78 <section class="recent-posts"> 79 79 <h1 class="showcase-heading"><?php _e( 'Recent Posts', 'twentyeleven' ); ?></h1> 80 80 81 81 <?php 82 82 … … 97 97 $recent->query( $recent_args ); 98 98 $counter = 0; 99 99 100 100 while ( $recent->have_posts() ) : $recent->the_post(); 101 101 // set $more to 0 in order to only get the first part of the post 102 102 global $more; 103 $more = 0; 103 $more = 0; 104 104 $counter++; 105 105 106 106 if ( 1 == $counter ) : 107 107 get_template_part( 'content', get_post_format() ); 108 108 echo '<ol class="other-recent-posts">'; 109 109 110 110 else : ?> 111 111 <li class="entry-title"> … … 115 115 </span> 116 116 </li> 117 117 118 118 <?php endif; 119 119 endwhile; 120 120 ?> 121 121 122 122 </ol> 123 123 </section> 124 124 125 125 <div class="widget-area" role="complementary"> 126 126 <?php if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?> 127 127 128 128 <?php 129 129 the_widget( 'Twenty_Eleven_Ephemera_Widget', '', 'before_title=<h1 class="widget-title">&after_title=</h1>' ); 130 ?> 130 ?> 131 131 132 132 <?php endif; // end sidebar widget area ?> -
trunk/wp-content/themes/twentyeleven/sidebar.php
r17670 r17714 26 26 <?php endif; // end sidebar widget area ?> 27 27 </div><!-- #secondary .widget-area --> 28 -
trunk/wp-content/themes/twentyeleven/widgets.php
r17670 r17714 6 6 */ 7 7 class Twenty_Eleven_Ephemera_Widget extends WP_Widget { 8 8 9 9 /** 10 10 * Constructor … … 16 16 $this->WP_Widget( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), $widget_ops ); 17 17 $this->alt_option_name = 'widget_twentyeleven_ephemera'; 18 18 19 19 add_action( 'save_post', array(&$this, 'flush_widget_cache' ) ); 20 20 add_action( 'deleted_post', array(&$this, 'flush_widget_cache' ) ); 21 21 add_action( 'switch_theme', array(&$this, 'flush_widget_cache' ) ); 22 22 23 23 } 24 24 … … 26 26 * Outputs the HTML for this widget. 27 27 * 28 * @param array An array of standard parameters for widgets in this theme 29 * @param array An array of settings for this widget instance 28 * @param array An array of standard parameters for widgets in this theme 29 * @param array An array of settings for this widget instance 30 30 * @return void Echoes it's output 31 31 **/ … … 44 44 } 45 45 46 ob_start(); 46 ob_start(); 47 47 extract( $args, EXTR_SKIP ); 48 48 49 49 $title = apply_filters( 'widget_title', empty($instance['title']) ? __( 'Ephemera' ) : $instance['title'], $instance, $this->id_base); 50 50 51 51 if ( ! isset( $instance['number'] ) ) 52 52 $instance['number'] = '10'; 53 53 54 54 if ( ! $number = absint( $instance['number'] ) ) 55 55 $number = 10; … … 74 74 75 75 if ( $ephemera->have_posts() ) : 76 76 77 77 echo $before_widget; 78 78 echo $before_title; … … 81 81 82 82 global $post; 83 83 84 84 ?> 85 85 <ol> 86 86 <?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?> 87 87 88 88 <?php if ( 'aside' == get_post_format( $post->ID ) ) : ?> 89 89 90 90 <li class="entry-title"> 91 91 <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a> … … 94 94 </span> 95 95 </li> 96 96 97 97 <?php elseif ( 'link' == get_post_format( $post->ID ) ) : ?> 98 98 … … 100 100 <?php 101 101 $link_url = get_permalink(); 102 102 103 103 if ( false != twentyeleven_url_grabber() ) 104 104 $link_url = twentyeleven_url_grabber(); … … 109 109 </span> 110 110 </li> 111 111 112 112 <?php endif; ?> 113 113 114 114 <?php endwhile; ?> 115 115 </ol> … … 117 117 118 118 echo $after_widget; 119 119 120 120 // Reset the global $the_post as this query will have stomped on it 121 121 wp_reset_postdata(); … … 144 144 return $instance; 145 145 } 146 146 147 147 function flush_widget_cache() { 148 148 wp_cache_delete( 'widget_twentyeleven_ephemera', 'widget' ); 149 } 149 } 150 150 151 151 /**
Note: See TracChangeset
for help on using the changeset viewer.