Changeset 11715 for sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/admin.php
- Timestamp:
- 03/28/2022 11:29:52 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/admin.php
r11714 r11715 191 191 192 192 $image_id = get_post_thumbnail_id( $post ); 193 $image = wp_get_attachment_image( $image_id ); 193 $classes = ''; 194 if ( Photo::is_controversial( $post ) ) { 195 $classes .= ' blurred'; 196 } 197 $image = wp_get_attachment_image( $image_id, 'thumbnail', false, [ 'class' => trim( $classes ) ] ); 194 198 195 199 $can_edit_post = current_user_can( 'edit_post', $post->ID ); … … 199 203 $prefixed_format, 200 204 sprintf( 201 '<div><a class=" row-title" href="%s" aria-label="%s">%s</a></div>',205 '<div><a class="photos-photo-link row-title" href="%s" aria-label="%s">%s</a></div>', 202 206 get_edit_post_link( $post_id ), 203 207 /* translators: %s: Post title. */ … … 487 491 $thumb_url = wp_get_attachment_image_src( $image_id, [ 900, 450 ], true ); 488 492 493 $classes = 'photo-thumbnail'; 494 495 if ( Photo::is_controversial( $image_id ) ) { 496 $classes .= ' blurred'; 497 } 498 489 499 printf( 490 '<a class=" row-title" href="%s" target="_blank" aria-label="%s"><img class="photo-thumbnail" src="%s" style="max-width:100%%" alt="" /></a>',500 '<a class="photos-photo-link row-title" href="%s" target="_blank" aria-label="%s"><img class="%s" src="%s" style="max-width:100%%" alt="" /></a>', 491 501 wp_get_attachment_url( $image_id ), 492 502 /* translators: %s: Post title. */ 493 503 esc_attr( sprintf( __( 'Edit photo associated with post “%s”', 'wporg-photos' ), $post->post_title ) ), 504 esc_attr( $classes ), 494 505 set_url_scheme( $thumb_url[0] ) 495 506 );
Note: See TracChangeset
for help on using the changeset viewer.