Changeset 19308
- Timestamp:
- 11/16/2011 12:08:29 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyeleven/inc/widgets.php
r18266 r19308 76 76 77 77 if ( $ephemera->have_posts() ) : 78 echo $before_widget; 79 echo $before_title; 80 echo $title; // Can set this with a widget option, or omit altogether 81 echo $after_title; 82 ?> 83 <ol> 84 <?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?> 78 85 79 echo $before_widget; 80 echo $before_title; 81 echo $title; // Can set this with a widget option, or omit altogether 82 echo $after_title; 86 <?php if ( 'link' != get_post_format() ) : ?> 83 87 84 ?> 85 <ol> 86 <?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?> 88 <li class="widget-entry-title"> 89 <a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a> 90 <span class="comments-link"> 91 <?php comments_popup_link( __( '0 <span class="reply">comments →</span>', 'twentyeleven' ), __( '1 <span class="reply">comment →</span>', 'twentyeleven' ), __( '% <span class="reply">comments →</span>', 'twentyeleven' ) ); ?> 92 </span> 93 </li> 87 94 88 <?php if ( 'link' != get_post_format() ): ?>95 <?php else : ?> 89 96 90 <li class="widget-entry-title"> 91 <a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a> 92 <span class="comments-link"> 93 <?php comments_popup_link( __( '0 <span class="reply">comments →</span>', 'twentyeleven' ), __( '1 <span class="reply">comment →</span>', 'twentyeleven' ), __( '% <span class="reply">comments →</span>', 'twentyeleven' ) ); ?> 94 </span> 95 </li> 97 <li class="widget-entry-title"> 98 <?php 99 // Grab first link from the post content. If none found, use the post permalink as fallback. 100 $link_url = twentyeleven_url_grabber(); 96 101 97 <?php else : ?> 102 if ( empty( $link_url ) ) 103 $link_url = get_permalink(); 104 ?> 105 <a href="<?php echo esc_url( $link_url ); ?>" title="<?php printf( esc_attr__( 'Link to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?> <span>→</span></a> 106 <span class="comments-link"> 107 <?php comments_popup_link( __( '0 <span class="reply">comments →</span>', 'twentyeleven' ), __( '1 <span class="reply">comment →</span>', 'twentyeleven' ), __( '% <span class="reply">comments →</span>', 'twentyeleven' ) ); ?> 108 </span> 109 </li> 98 110 99 <li class="widget-entry-title"> 100 <?php 101 // Grab first link from the post content. If none found, use the post permalink as fallback. 102 $link_url = twentyeleven_url_grabber(); 111 <?php endif; ?> 103 112 104 if ( empty( $link_url ) ) 105 $link_url = get_permalink(); 106 ?> 107 <a href="<?php echo esc_url( $link_url ); ?>" title="<?php printf( esc_attr__( 'Link to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?> <span>→</span></a> 108 <span class="comments-link"> 109 <?php comments_popup_link( __( '0 <span class="reply">comments →</span>', 'twentyeleven' ), __( '1 <span class="reply">comment →</span>', 'twentyeleven' ), __( '% <span class="reply">comments →</span>', 'twentyeleven' ) ); ?> 110 </span> 111 </li> 113 <?php endwhile; ?> 114 </ol> 115 <?php 112 116 113 <?php endif; ?>117 echo $after_widget; 114 118 115 <?php endwhile; ?> 116 </ol> 117 <?php 118 119 echo $after_widget; 120 121 // Reset the post globals as this query will have stomped on it 122 wp_reset_postdata(); 119 // Reset the post globals as this query will have stomped on it 120 wp_reset_postdata(); 123 121 124 122 // end check for ephemeral posts
Note: See TracChangeset
for help on using the changeset viewer.