Changeset 12544 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-photos/template-parts/photo-single.php
- Timestamp:
- 04/14/2023 08:39:03 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-photos/template-parts/photo-single.php
r12540 r12544 56 56 57 57 <div class="entry-content"> 58 <figure> 59 <?php $alt_text = get_the_content(); ?> 58 <?php $alt_text = get_the_content(); ?> 60 59 61 <a href="<?php echo wp_get_attachment_url( get_post_thumbnail_id() ); ?>" aria-label="<?php esc_attr_e( 'View larger photo', 'wporg-photos' ); ?>"> 62 <?php 63 printf( 64 '<img class="single-photo" src="%s" srcset="%s" alt="%s">', 65 esc_url( get_the_post_thumbnail_url( get_the_ID(), 'medium') ), 66 esc_attr( wp_get_attachment_image_srcset( get_post_thumbnail_id() ) ), 60 <a href="<?php echo wp_get_attachment_url( get_post_thumbnail_id() ); ?>"> 61 <?php 62 printf( 63 '<img class="single-photo" src="%s" srcset="%s" alt="%s">', 64 esc_url( get_the_post_thumbnail_url( get_the_ID(), 'medium') ), 65 esc_attr( wp_get_attachment_image_srcset( get_post_thumbnail_id() ) ), 66 sprintf( 67 /* translators: %s: The alternative text for the photo. */ 68 'View larger photo: %s', 67 69 esc_attr( $alt_text ) 68 ) ;69 ?>70 </a>70 ) 71 ); 72 ?> 71 73 72 <?php if ( $alt_text ) : ?>74 </a> 73 75 74 <figcaption class="wp-caption-text" aria-hidden="true"> 75 <span><?php _e( 'Alternative Text:', 'wporg-photos' ); ?></span><?php echo wp_kses_post( $alt_text ); ?> 76 </figcaption> 76 <?php if ( $alt_text ) : ?> 77 77 78 <?php endif; ?> 79 </figure> 78 <p class="photo-alt-text"> 79 <span><?php _e( 'Alternative Text: ', 'wporg-photos' ); ?></span><?php echo wp_kses_post( $alt_text ); ?> 80 81 </p> 82 83 <?php endif; ?> 84 80 85 </div><!-- .entry-content --> 81 86
Note: See TracChangeset
for help on using the changeset viewer.