- Timestamp:
- 09/18/2019 12:24:35 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets/class-wp-widget-recent-posts.php
r43571 r46163 94 94 <?php foreach ( $r->posts as $recent_post ) : ?> 95 95 <?php 96 $post_title = get_the_title( $recent_post->ID ); 97 $title = ( ! empty( $post_title ) ) ? $post_title : __( '(no title)' ); 96 $post_title = get_the_title( $recent_post->ID ); 97 $title = ( ! empty( $post_title ) ) ? $post_title : __( '(no title)' ); 98 $aria_current = ''; 99 100 if ( get_queried_object_id() === $recent_post->ID ) { 101 $aria_current = ' aria-current="page"'; 102 } 98 103 ?> 99 104 <li> 100 <a href="<?php the_permalink( $recent_post->ID ); ?>" ><?php echo $title; ?></a>105 <a href="<?php the_permalink( $recent_post->ID ); ?>"<?php echo $aria_current; ?>><?php echo $title; ?></a> 101 106 <?php if ( $show_date ) : ?> 102 107 <span class="post-date"><?php echo get_the_date( '', $recent_post->ID ); ?></span>
Note: See TracChangeset
for help on using the changeset viewer.