Making WordPress.org

Changeset 11605


Ignore:
Timestamp:
02/25/2022 03:29:02 AM (3 years ago)
Author:
dd32
Message:

Theme Directory: Notify theme authors after their theme update via SVN fails to be imported.

See #5899.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/jobs/class-svn-import.php

    r11588 r11605  
    133133            }
    134134
    135             // Otherwise email the author about this problem.
     135            /*
     136             * Otherwise email the author about this problem.
     137             * NOTE: This email has a HTML content type, as Theme Check output is HTML.
     138             * TRANSLATION: These strings are not marked for translated, as they will always be English at present.
     139             */
    136140            wp_mail(
    137                 // $uploader->author->user_email,
    138                 get_user_by( 'login', 'dd32' )->user_email, // TODO, DEBUG for now.
     141                $uploader->author->user_email,
    139142                sprintf(
    140143                    'Theme Import Failure: %s [%d] %s',
     
    144147                ),
    145148                sprintf(
    146                     "Hi %s,\n\nYour theme update for %s %s has failed some checks. Please see the below errors.\n\n%s\n\n----\nWordPress Theme Directory",
    147                     $uploader->author->user_email . ' ' .
    148                     ( $uploader->author->display_name ?: $uploader->author->user_login ),
    149                     $uploader->theme->display('Title'),
    150                     $uploader->theme->display('Version'),
    151                     $return->get_error_message(),
     149                    nl2br(
     150                        // Intentionally not translated. See above.
     151                        "Hi %s,\n\n" .
     152                        "Your theme update for %s has failed requirements.\n" .
     153                        "Please see the below error and commit an updated version, this may not be the only error present.\n\n%s\n\n" .
     154                        "Please review the latest <a href='%s'>Theme Guidelines</a>.\n" .
     155                        "----\nWordPress Theme Directory",
     156                    ),
     157                    esc_html( $uploader->author->display_name ?: $uploader->author->user_login ),
     158                    $uploader->theme->display('Name') . ' ' . $uploader->theme->display('Version'),
     159                    '<div style="margin-left: 30px">' . $return->get_error_message() . '</div>',
     160                    'https://make.wordpress.org/themes/handbook/review/required/'
    152161                ),
    153162                [
    154                     'From: "WordPress Theme Directory" <themes@wordpress.org>'
     163                    'From: "WordPress Theme Directory" <themes@wordpress.org>',
     164                    'Content-Type: text/html; charset=UTF-8'
    155165                ]
    156166            );
Note: See TracChangeset for help on using the changeset viewer.