Making WordPress.org

Changeset 12840


Ignore:
Timestamp:
08/14/2023 09:58:12 PM (10 months ago)
Author:
coffee2code
Message:

Photo Directory, Rejection: Add prefix label to each rejection reason in dropdown and alphabetize the list.

Props topher1kenobe, coffee2code.
Fixes #7182.

File:
1 edited

Legend:

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

    r12808 r12840  
    3030        self::$rejection_reasons = [
    3131            ''              => [
    32                 'label' => __( 'Do not reject', 'wporg-photos' ),
     32                'label' => __( 'Approve: Do not reject', 'wporg-photos' ),
    3333                'email' => '',
    3434            ],
     35            'anothers_art' => [
     36                'label' => __( 'Other art: Predominantly another piece of art', 'wporg-photos' ),
     37                'email' => __( 'The photo appeared to largely consist of the art of another person. We respect the rights of other artists by not distributing reproductions of their work.', 'wporg-photos' ),
     38            ],
     39            'branding'      => [
     40                'label' => __( 'Branding: Prominent branding', 'wporg-photos' ),
     41                'email' => __ ( 'The photo prominently displayed branding in such a way that the branding and/or branded product was the focus of the image. We do not accept branded subject matter to avoid the directory being used for promotional purposes or to imply endorsement by the WordPress project.', 'wporg-photos' ),
     42            ],
     43            'collage'        => [
     44                'label' => __( 'Collage: Collage or composite image', 'wporg-photos' ),
     45                'email' => __( 'The image appeared to be a collage or composite of separate images.', 'wporg-photos' ),
     46            ],
     47            'copyright'     => [
     48                'label' => __( 'Copyright: Potential copyright/ownership infringement', 'wporg-photos' ),
     49                'email' => __( 'The photo has been posted elsewhere but does not appear to be your original work. We require that you "have the copyright or other legal ownership for any photo you submit". This does not include posting photos created by others, even if their licensing is permissive in its use, since copyright is not conferred to you.', 'wporg-photos' ),
     50            ],
     51            'faces'         => [
     52                'label' => __( 'Faces: Contains human face(s)', 'wporg-photos' ),
     53                'email' => __( 'The photo contained one or more human faces. We do not currently accept photos that show human faces, wholly or partially, even if facial features cannot clearly be identified.', 'wporg-photos' ),
     54            ],
    3555            'general'       => [
    36                 'label' => __( 'General/nonspecific', 'wporg-photos' ),
     56                'label' => __( 'General: General/nonspecific', 'wporg-photos' ),
    3757                'email' => '', // No specific reason will be conveyed to contributor.
    3858            ],
    39             'copyright'     => [
    40                 'label' => __( 'Potential copyright/ownership infringement', 'wporg-photos' ),
    41                 'email' => __( 'The photo has been posted elsewhere but does not appear to be your original work. We require that you "have the copyright or other legal ownership for any photo you submit". This does not include posting photos created by others, even if their licensing is permissive in its use, since copyright is not conferred to you.', 'wporg-photos' ),
    42             ],
    43             'branding'      => [
    44                 'label' => __( 'Prominent branding', 'wporg-photos' ),
    45                 'email' => __ ( 'The photo prominently displayed branding in such a way that the branding and/or branded product was the focus of the image. We do not accept branded subject matter to avoid the directory being used for promotional purposes or to imply endorsement by the WordPress project.', 'wporg-photos' ),
     59            'image_extreme' => [
     60                'label' => __( 'Extreme: Violence, gore, hate, or sexual content', 'wporg-photos' ),
     61                'email' => __( 'The photo depicted some element of violence, gore, hate, or sexual content.', 'wporg-photos' ),
    4662            ],
    4763            'image_quality' => [
    48                 'label' => __( 'Insufficient image quality (e.g. blurriness, composition, lighting, lens issues)', 'wporg-photos' ),
     64                'label' => __( 'Quality: Insufficient image quality (e.g. blurriness, composition, lighting, lens issues)', 'wporg-photos' ),
    4965                'email' => __( 'The photo had an issue regarding image quality. Submissions should be of high quality composition, lighting, focus, and color. The image should be free of blur (for the primary subject), noise, lens flare, glare, and spots due to water or dirt on the lens.', 'wporg-photos' ),
    5066            ],
     67            'image_subject' => [
     68                'label' => __( 'Subject matter: Image subject matter', 'wporg-photos' ),
     69                'email' => __( 'The photo included subject matter of insufficient quality.', 'wporg-photos' ),
     70            ],
    5171            'not_a_photo'    => [
    52                 'label' => __( 'Not a photo (e.g. screenshot, digital art)', 'wporg-photos' ),
     72                'label' => __( 'Not a photo: Not a photo (e.g. screenshot, digital art)', 'wporg-photos' ),
    5373                'email' => __( 'The image did not appear to be a photograph. We do not accept screenshots, digital art, or other non-photographic images.', 'wporg-photos' ),
    5474            ],
    55             'collage'        => [
    56                 'label' => __( 'Collage or composite image', 'wporg-photos' ),
    57                 'email' => __( 'The image appeared to be a collage or composite of separate images.', 'wporg-photos' ),
     75            'other'         => [
     76                'label' => __( 'See below: Reason specified below', 'wporg-photos' ),
     77                'email' => '',
    5878            ],
    5979            'overlays'       => [
    60                 'label' => __( 'Overlays, watermark, borders, or other additions', 'wporg-photos' ),
     80                'label' => __( 'Overlays: Overlays, watermark, borders, or other additions', 'wporg-photos' ),
    6181                'email' => __( 'The photo included an overlay of some form (e.g. graphic, text, watermark, border).', 'wporg-photos' ),
    6282            ],
    63             'image_subject' => [
    64                 'label' => __( 'Image subject matter', 'wporg-photos' ),
    65                 'email' => __( 'The photo included subject matter of insufficient quality.', 'wporg-photos' ),
    66             ],
    67             'image_extreme' => [
    68                 'label' => __( 'Violence, gore, hate, or sexual content', 'wporg-photos' ),
    69                 'email' => __( 'The photo depicted some element of violence, gore, hate, or sexual content.', 'wporg-photos' ),
    70             ],
    71             'text'          => [
    72                 'label' => __( 'Predominantly text', 'wporg-photos' ),
    73                 'email' => __( 'The photo was predominantly text. Please refrain from submitting photos where text is a significant element of the photo.', 'wporg-photos' ),
    74             ],
    7583            'overprocessed' => [
    76                 'label' => __( 'Overprocessed', 'wporg-photos' ),
     84                'label' => __( 'Overprocessed: Overprocessed', 'wporg-photos' ),
    7785                'email' => __( 'The photo appeared to be overprocessed with filters or other photo adjustments. We prefer minimal processing.', 'wporg-photos' ),
    7886            ],
    79             'anothers_art' => [
    80                 'label' => __( 'Predominantly another piece of art', 'wporg-photos' ),
    81                 'email' => __( 'The photo appeared to largely consist of the art of another person. We respect the rights of other artists by not distributing reproductions of their work.', 'wporg-photos' ),
    82             ],
    83             'faces'         => [
    84                 'label' => __( 'Contains human face(s)', 'wporg-photos' ),
    85                 'email' => __( 'The photo contained one or more human faces. We do not currently accept photos that show human faces, wholly or partially, even if facial features cannot clearly be identified.', 'wporg-photos' ),
    86             ],
    8787            'privacy'       => [
    88                 'label' => __( 'Potentially violates privacy', 'wporg-photos' ),
     88                'label' => __( 'Privacy: Potentially violates privacy', 'wporg-photos' ),
    8989                'email' => __( 'The photo contained potentially privacy-violating material such as a home address, license plate, or other form of personal identification.', 'wporg-photos' ),
    9090            ],
    91             'variation'     => [
    92                 'label' => __( 'Duplicate or minor variation of submitted photo', 'wporg-photos' ),
    93                 'email' => __( 'The photo is a duplicate or minor variation of something you have already had published to the site or recently submitted. This can be the same subject matter taken from a different angle, from slightly before or after in time, with a different composition or cropping or dimensions, or staged or edited differently.', 'wporg-photos' ),
    94             ],
    9591            'submission-error' => [ // This specific key is referenced in code, so make related updates if renaming.
    96                 'label' => __( 'Submission error', 'wporg-photos' ),
     92                'label' => __( 'Error: Submission error', 'wporg-photos' ),
    9793                /* translators: %s: URL to meta.trac to report bugs. */
    9894                'email' => sprintf(
     
    10197                ),
    10298            ],
    103             'other'         => [
    104                 'label' => __( 'Reason specified below', 'wporg-photos' ),
    105                 'email' => '',
     99            'text'          => [
     100                'label' => __( 'Text: Predominantly text', 'wporg-photos' ),
     101                'email' => __( 'The photo was predominantly text. Please refrain from submitting photos where text is a significant element of the photo.', 'wporg-photos' ),
     102            ],
     103            'variation'     => [
     104                'label' => __( 'Variation/Duplicate: Duplicate or minor variation of submitted photo', 'wporg-photos' ),
     105                'email' => __( 'The photo is a duplicate or minor variation of something you have already had published to the site or recently submitted. This can be the same subject matter taken from a different angle, from slightly before or after in time, with a different composition or cropping or dimensions, or staged or edited differently.', 'wporg-photos' ),
    106106            ],
    107107        ];
     
    307307        // Return all reasons if one wasn't specified.
    308308        if ( ! $reason ) {
    309             return self::$rejection_reasons;
     309            $reasons = self::$rejection_reasons;
     310            uasort( $reasons, function( $a, $b ) {
     311                return strcmp( $a['label'], $b['label'] );
     312            } );
     313            return $reasons;
    310314        }
    311315
Note: See TracChangeset for help on using the changeset viewer.