Making WordPress.org

Changeset 13132


Ignore:
Timestamp:
01/22/2024 12:51:02 AM (14 months ago)
Author:
dd32
Message:

Plugin Directory: Use the new post-plugin-submission email template.

See #7384.
Fixes #6943.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php

    r13117 r13132  
    99use WordPressdotorg\Plugin_Directory\Admin\Tools\Upload_Token;
    1010use WordPressdotorg\Plugin_Directory\Clients\HelpScout;
     11use WordPressdotorg\Plugin_Directory\Email\Plugin_Submission as Plugin_Submission_Email;
    1112
    1213/**
     
    488489
    489490        // Send plugin author an email for peace of mind.
    490         $this->send_email_notification();
     491        $email = new Plugin_Submission_Email( $plugin_post, wp_get_current_user() );
     492        $email->send();
    491493
    492494        $message = sprintf(
     
    839841    }
    840842
    841     /**
    842      * Sends out an email confirmation to the plugin's author.
    843      */
    844     public function send_email_notification() {
    845 
    846         /* translators: %s: plugin name */
    847         $email_subject = sprintf(
    848             __( '[WordPress Plugin Directory] Successful Plugin Submission - %s', 'wporg-plugins' ),
    849             $this->plugin['Name']
    850         );
    851 
    852         /*
    853             Please leave the blank lines in place.
    854         */
    855         $email_content = sprintf(
    856             // translators: 1: plugin name, 2: plugin slug.
    857             __(
    858 'Thank you for uploading %1$s to the WordPress Plugin Directory. We will review your submission as soon as possible and send you a follow up email with the results.
    859 
    860 Your plugin has been given the initial permalink (aka slug) of %2$s based on your display name of %1$s. This is subject to change based on the results of your review.
    861 
    862 If you need to change the plugin permalink, please reply to this email immediately and let us know what the correct slug should be. We will be unable to change your plugin slug once your review is completed.
    863 
    864 If there are any other problems with your submission, please reply to this email and let us know right away. In most cases, we can correct errors as long as the plugin has not yet been approved.
    865 
    866 We remind you read the following links to understand the review process and our expectations:
    867 
    868 Guidelines: https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/
    869 Frequently Asked Questions: https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/
    870 
    871 Also, make sure to follow our official blog: https://make.wordpress.org/plugins/
    872 
    873 Note: Reviews are currently in English only. We apologize for the inconvenience.
    874 
    875 --
    876 The WordPress Plugin Directory Team
    877 https://make.wordpress.org/plugins', 'wporg-plugins'
    878             ),
    879             $this->plugin['Name'],
    880             $this->plugin_slug
    881         );
    882 
    883         $user_email = wp_get_current_user()->user_email;
    884 
    885         wp_mail( $user_email, $email_subject, $email_content, 'From: plugins@wordpress.org' );
    886     }
    887 
    888843    // Helper.
    889844    /**
Note: See TracChangeset for help on using the changeset viewer.