Making WordPress.org


Ignore:
Timestamp:
03/31/2020 04:00:08 AM (5 years ago)
Author:
dd32
Message:

Plugin Directory: Change the default email subjects based on the plugin status.

Props Ipstenu.
Fixes #5085.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-review-tools.php

    r9096 r9649  
    259259
    260260            if ( 'new' === $post->post_status || 'pending' === $post->post_status ) {
    261                 /* translators: %s: plugin title */
    262                 $subject = sprintf( __( '[WordPress Plugin Directory] Request: %s', 'wporg-plugins' ), $post->post_title );
     261                /* translators: %s: Plugin Title */
     262                $subject = sprintf( __( '[WordPress Plugin Directory] Review in Progress: %s', 'wporg-plugins' ), $post->post_title );
    263263            } elseif ( 'rejected' === $post->post_status ) {
    264                 /* translators: %s: plugin title */
     264                /* translators: %s: Plugin Title */
    265265                $subject = sprintf( __( '[WordPress Plugin Directory] Rejection Explanation: %s', 'wporg-plugins' ), $post->post_title );
     266            } elseif ( 'closed' === $post->post_status || 'disabled' === $post->post_status ) {
     267                $close_reason  = (string) get_post_meta( $post->ID, '_close_reason', true );
     268                $close_reasons = array(
     269                    'security-issue'                => __( 'Security', 'wporg-plugins' ),
     270                    'guideline-violation'           => __( 'Guideline Violation', 'wporg-plugins' ),
     271                    'licensing-trademark-violation' => __( 'Licensing/Trademark Violation', 'wporg-plugins' ),
     272                );
     273
     274                if ( isset( $close_reasons[ $close_reason ] ) ) {
     275                    /* translators: 1: Closure Reason, 2: Plugin Title */
     276                    $subject = sprintf( __( '[WordPress Plugin Directory] Closure Notice - %1$s: %2$s', 'wporg-plugins' ), $close_reasons[ $close_reason ], $post->post_title );
     277                } else {
     278                    /* translators: %s: Plugin Title */
     279                    $subject = sprintf( __( '[WordPress Plugin Directory] Closure Notice: %s', 'wporg-plugins' ), $post->post_title );
     280                }
    266281            } else {
    267                 /* translators: %s: plugin title */
     282                /* translators: %s: Plugin Title */
    268283                $subject = sprintf( __( '[WordPress Plugin Directory] Notice: %s', 'wporg-plugins' ), $post->post_title );
    269284            }
Note: See TracChangeset for help on using the changeset viewer.