Making WordPress.org

Changeset 12706


Ignore:
Timestamp:
07/03/2023 07:28:23 PM (3 years ago)
Author:
coffee2code
Message:

Photo Directory, Admin: Properly report when a photo was automatically flagged versus manually flagged.

See #7119.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/admin.php

    r12700 r12706  
    114114        }
    115115        elseif ( $user_id = Flagged::get_flagger( $post ) ) {
    116             /* translators: 1: URL to the profile of the user who flagged the photo, 2: The name of the user who flagged the photo. */
    117             $notice = __( '<strong>This photo was flagged by <a href="%1$s">%2$s</a>.', 'wporg-photos' );
     116            // A user can't actually flag their own submission. This results from auto-flagging.
     117            if ( $user_id === $post->post_author ) {
     118                $notice = __( '<strong>This photo was automatically flagged due to potential concerns after image analysis.', 'wporg-photos' );
     119            } else {
     120                /* translators: 1: URL to the profile of the user who flagged the photo, 2: The name of the user who flagged the photo. */
     121                $notice = __( '<strong>This photo was flagged by <a href="%1$s">%2$s</a>.', 'wporg-photos' );
     122            }
    118123        }
    119124
Note: See TracChangeset for help on using the changeset viewer.