Making WordPress.org

Changeset 9101


Ignore:
Timestamp:
08/14/2019 01:29:42 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Plugin Directory: Improve plugin submission page:

  • Show upload form at the top, after a brief intro, to make errors easier to notice.
  • Clarify upload error messages.

Props Ipstenu.
Fixes #4674.

Location:
sites/trunk/wordpress.org/public_html/wp-content
Files:
2 edited

Legend:

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

    r9098 r9101  
    116116        // Make sure it doesn't use a TRADEMARK protected slug.
    117117        if ( $this->has_trademarked_slug() ) {
    118             $error = __( 'Error: The plugin has a trademarked name.', 'wporg-plugins' );
     118            $error = __( 'Error: The plugin includes a trademarked name.', 'wporg-plugins' );
    119119
    120120            return new \WP_Error( 'trademarked_name', $error . ' ' . sprintf(
    121                 /* translators: 1: plugin slug, 2: 'Plugin Name:', 3: plugin email address. */
    122                 __( 'Your chosen plugin name - %1$s - has been flagged as trademark infringement and cannot be used. We have been legally compelled to protect specific trademarks and as such prevent the use of specific terms. Please change the %2$s line in your main plugin file and readme, then you may upload it again. If you feel this is in error, please email us at %3$s and explain why.', 'wporg-plugins' ),
     121                /* translators: 1: plugin slug, 2: trademarked term, 3: 'Plugin Name:', 4: plugin email address */
     122                __( 'Your chosen plugin name - %1$s - has been flagged for trademark infringement by containing the term "%2$s" and as such cannot be used. In order to comply with demands from trademark owners and to protect developers, we are disallowing the use of specific terms in plugin slugs entirely. Please change the %3$s line in your main plugin file and readme so that you may upload your plugin for review. If you feel this is in error, please email us at %4$s and explain why.', 'wporg-plugins' ),
    123123                '<code>' . $this->plugin_slug . '</code>',
     124                $this->has_trademarked_slug(),
    124125                '<code>Plugin Name:</code>',
    125126                '<code>plugins@wordpress.org</code>'
     
    135136            return new \WP_Error( 'already_exists', $error . ' ' . sprintf(
    136137                /* translators: 1: plugin slug, 2: 'Plugin Name:' */
    137                 __( 'There is already a plugin with the name %1$s in the directory. Please rename your plugin by changing the %2$s line in your main plugin file and upload it again.', 'wporg-plugins' ),
     138                __( 'There is already a plugin with the name %1$s in the directory. You must rename your plugin by changing the %2$s line in your main plugin file and in your readme. Once you have done so, you may upload it again.', 'wporg-plugins' ),
    138139                '<code>' . $this->plugin_slug . '</code>',
    139140                '<code>Plugin Name:</code>'
     
    147148            return new \WP_Error( 'already_submitted', $error . ' ' . sprintf(
    148149                /* translators: 1: plugin slug, 2: Documentation URL, 3: plugins@wordpress.org */
    149                 __( 'You have already submitted a plugin named %1$s. There is no need to resubmit existing plugins, even for new versions. Simply update your plugin within the directory via <a href="%2$s">SVN</a>. If you need assistance, email <a href="mailto:%3$s">%3$s</a> and let us know.', 'wporg-plugins' ),
     150                __( 'You have already submitted a plugin named %1$s. There is no need to resubmit existing plugins, even for new versions. Simply update your plugin within the directory via <a href="%2$s">SVN</a>. If you need assistance, email <a href="mailto:%3$s">%3$s</a> and let us know. Make sure to include any error messages in your email.', 'wporg-plugins' ),
    150151                '<code>' . $this->plugin_slug . '</code>',
    151152                __( 'https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/', 'wporg-plugins' ),
     
    160161            return new \WP_Error( 'trademarked_name', $error . ' ' . sprintf(
    161162                /* translators: 1: plugin slug, 2: 'Plugin Name:' */
    162                 __( 'Your chosen plugin name - %1$s - is not permitted because it is too short. Please change the %2$s line in your main plugin file and readme and upload it again.', 'wporg-plugins' ),
     163                __( 'Your chosen plugin name - %1$s - is not permitted because it is too short. Please change the %2$s line in your main plugin file and readme to a different name. When you have finished, you may upload your plugin again.', 'wporg-plugins' ),
    163164                '<code>' . $this->plugin_slug . '</code>',
    164165                '<code>Plugin Name:</code>'
     
    171172            return new \WP_Error( 'no_description', $error . ' ' . sprintf(
    172173                /* translators: 1: plugin header line, 2: Documentation URL */
    173                 __( 'Add a %1$s line to your main plugin file and upload the plugin again. Please review our documentation on <a href="%2$s">Plugin Headers</a> for more information.', 'wporg-plugins' ),
     174                __( 'We cannot find a description in your plugin headers. Please add a %1$s line to your main plugin file and upload the complete plugin again. If you need more information, please review our documentation on <a href="%2$s">Plugin Headers</a>.', 'wporg-plugins' ),
    174175                '<code>Description:</code>',
    175176                __( 'https://developer.wordpress.org/plugins/the-basics/header-requirements/', 'wporg-plugins' )
     
    182183            return new \WP_Error( 'no_version', $error . ' ' . sprintf(
    183184                /* translators: 1: plugin header line, 2: Documentation URL */
    184                 __( 'Add a %1$s line to your main plugin file and upload the plugin again. Please review our documentation on <a href="%2$s">Plugin Headers</a> for more information.', 'wporg-plugins' ),
     185                __( 'We cannot find a version listed in your plugin headers. Please add a %1$s line to your main plugin file and upload the complete plugin again. If you need more information, please review our documentation on <a href="%2$s">Plugin Headers</a>.', 'wporg-plugins' ),
    185186                '<code>Version:</code>',
    186187                __( 'https://developer.wordpress.org/plugins/the-basics/header-requirements/', 'wporg-plugins' )
     
    222223
    223224        // Pass it through Plugin Check and see how great this plugin really is.
    224         // We're not actually using this right now
     225        // We're not actually using this right now.
    225226        $result = $this->check_plugin();
    226227
     
    230231            return new \WP_Error( 'failed_checks', $error . ' ' . sprintf(
    231232                /* translators: 1: Plugin Check Plugin URL, 2: https://make.wordpress.org/plugins */
    232                 __( 'Please correct the problems with the plugin and upload it again. You can also use the <a href="%1$s">Plugin Check Plugin</a> to test your plugin before uploading. If you have any questions about this please post them to %2$s.', 'wporg-plugins' ),
     233                __( 'Please correct the listed problems with your plugin and upload it again. You can also use the <a href="%1$s">Plugin Check Plugin</a> to test your plugin before uploading. If you have any questions about this please post them to %2$s.', 'wporg-plugins' ),
    233234                '//wordpress.org/plugins/plugin-check/',
    234235                '<a href="https://make.wordpress.org/plugins">https://make.wordpress.org/plugins</a>'
     
    305306        $message = sprintf(
    306307            /* translators: 1: plugin name, 2: plugin slug, 3: plugins@wordpress.org */
    307             __( 'Thank you for uploading %1$s to the WordPress Plugin Directory. It has been given the initial plugin slug of %2$s, however that is subject to change based on the results of your code review. If this slug is incorrect, please contact us immediately, as it cannot be changed once your plugin is approved.' ),
     308            __( 'Thank you for uploading %1$s to the WordPress Plugin Directory. Your plugin has been given the initial slug of %2$s, however that is subject to change based on the results of your code review. If this slug is incorrect, please contact us immediately, as it cannot be changed once your plugin is approved.' ),
    308309            esc_html( $this->plugin['Name'] ),
    309310            '<code>' . $this->plugin_slug . '</code>'
     
    332333     * Whether the uploaded plugin uses a reserved slug.
    333334     *
    334      * @return bool
     335     * @return bool True if the slug is reserved, false otherwise.
    335336     */
    336337    public function has_reserved_slug() {
    337338        $reserved_slugs = array(
    338339            // Plugin Directory URL parameters.
     340            'about',
     341            'admin',
    339342            'browse',
     343            'developers',
     344            'developer',
     345            'featured',
     346            'filter',
     347            'jquery',
     348            'new',
     349            'page',
     350            'popular',
     351            'post',
     352            'search',
    340353            'tag',
    341             'search',
    342             'filter',
     354            'updated',
    343355            'upload',
    344             'featured',
    345             'popular',
    346             'new',
    347             'updated',
    348             'about',
    349             'developers',
    350             'admin',
     356            'wordpress',
    351357            'wp-admin',
    352             'wordpress',
    353             'jquery',
    354358        );
    355359
     
    360364     * Whether the uploaded plugin uses a trademark in the slug.
    361365     *
    362      * @return bool
     366     * @return string|false The trademarked slug if found, false otherwise.
    363367     */
    364368    public function has_trademarked_slug() {
    365369        $trademarked_slugs = array(
    366370            'contact-form-7',
     371            'divi',
     372            'easy-digital-downloads',
     373            'elementor',
    367374            'facebook',
     375            'feedburner',
    368376            'google',
    369377            '-gram',
    370378            'gram-',
     379            'gravity-forms',
     380            'gutenberg',
    371381            'instagram',
    372382            'insta',
     383            'macintosh',
    373384            'microsoft',
    374             'paypal',
     385            'ninja-forms',
     386            'pinterest',
     387            'samsung',
    375388            'twitter',
    376389            'tweet',
     
    380393            'wordpress',
    381394            'yoast',
     395            'youtube',
    382396        );
    383397
     
    386400        foreach ( $trademarked_slugs as $trademark ) {
    387401            if ( false !== strpos( $this->plugin_slug, $trademark ) ) {
    388                 $has_trademarked_slug = true;
     402                $has_trademarked_slug = $trademark;
    389403                break;
    390404            }
     
    483497Your plugin has been given the initial slug of %2$s based on your display name of %1$s. This is subject to change based on the results of your review.
    484498
    485 If there are any 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. For situations like an incorrect plugin slug, we are unable to change that post approval. If you do not inform us of any requirements now, we will be unable to honor them later.
    486 
    487 We recommend you review the following links to understand the review process and our expectations:
     499If you need to change the plugin slug, please reply to this email immediately and let us know, otherwise we will be unable to do so later.
     500
     501If 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.
     502
     503We remind you review the following links to understand the review process and our expectations:
    488504
    489505Guidelines: https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/page-add.php

    r7447 r9101  
    2525                <section>
    2626                    <div class="container">
    27                         <h2 id="faq"><?php esc_html_e( 'FAQ', 'wporg-plugins' ); ?></h2>
     27                        <p>
     28                            <?php
     29                            printf(
     30                                /* translators: 1: URL to plugin guidelines, 2: URL to plugin developer FAQ. */
     31                                wp_kses_post( __( 'Before you submit your plugin, we ask you to review our <a href="%1$s">Guidelines</a> and read the <a href="%2$s">Frequently Asked Questions</a>. A brief selections of common questions are listed below the form.', 'wporg-plugins' ) ),
     32                                esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' ),
     33                                esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/' )
     34                            );
     35                            ?>
     36                        </p>
     37
     38                        <?php echo do_shortcode( '[wporg-plugin-upload]' ); ?>
     39
     40                        <p>
     41                            <?php
     42                            printf(
     43                                /* translators: URL to plugin guidelines. */
     44                                wp_kses_post( __( 'Once submitted, your plugin will be manually reviewed for any common errors as well as ensuring it complies with <a href="%s">all the guidelines</a>.', 'wporg-plugins' ) ),
     45                                esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' )
     46                            );
     47                            ?>
     48                        </p>
     49                    </div>
     50                </section>
     51
     52                <section>
     53                    <div class="container">
     54                        <h2 id="faq"><?php esc_html_e( 'Frequently Asked Questions', 'wporg-plugins' ); ?></h2>
    2855
    2956                        <h3><?php esc_html_e( 'How long will the review process take?', 'wporg-plugins' ); ?></h3>
     
    4572                        <p><?php echo wp_kses_post( __( 'Please don&#8217;t! Instead email <code>plugins@wordpress.org</code> and we can rename your plugin as long as it&#8217;s not approved. Since we check emails first, the odds are we&#8217;ll catch it. If we don&#8217;t, just email us and explain the mistake. We&#8217;ll explain what to do.', 'wporg-plugins' ) ); ?></p>
    4673
    47                         <h3><?php esc_html_e( 'Why was I told my plugin name was unacceptable?', 'wporg-plugins' ); ?></h3>
    48                         <p>
    49                             <?php
    50                             printf(
    51                                 /* translators: URL to plugin guidelines. */
    52                                 wp_kses_post( __( 'This is explained in detail in our <a href="%s">detailed plugin guidelines</a>, but currently we give you the chance to rename it during the review process if the plugin name violates the guideline. Some terms (like &#8220;plugin&#8221; and &#8220;WordPress&#8221;) will be removed for you, as those should not be used at all. We get it; you&#8217;re a WordPress Plugin.', 'wporg-plugins' ) ),
    53                                 esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' )
    54                             );
    55                             ?>
    56                         </p>
    57                         <p><?php echo wp_kses_post( __( 'Regarding the names and trademarks of other companies and plugins, don&#8217;t use them at the start of your plugin name. If you&#8217;re not Facebook, you shouldn&#8217;t submit a plugin that uses <code>facebook</code> as the first term in your slug. &#8220;Facebook Like Sharer&#8221; (which would be <code>facebook-like-sharer</code>) is not acceptable, but &#8220;Like Sharer for Facebook&#8221; (which would be <code>like-sharer-for-facebook</code>) would be alright.', 'wporg-plugins' ) ); ?></p>
    58                     </div>
    59                 </section>
    60 
    61                 <section>
    62                     <div class="container">
    63                         <p>
    64                             <?php
    65                             printf(
    66                                 /* translators: URL to plugin guidelines. */
    67                                 wp_kses_post( __( 'Once submitted, your plugin will be manually reviewed for any common errors as well as ensuring it complies with <a href="%s">all the guidelines</a>.', 'wporg-plugins' ) ),
    68                                 esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' )
    69                             );
    70                             ?>
    71                         </p>
    72 
    73                         <?php echo do_shortcode( '[wporg-plugin-upload]' ); ?>
    74 
    75                         <p><?php esc_html_e( 'Even if you&#8217;ve submitted a dozen plugins, take the time to refresh your memory with the following information:', 'wporg-plugins' ); ?>
    76                         <ul>
    77                             <li><a href="https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/"><?php esc_html_e( 'How to use SVN', 'wporg-plugins' ); ?></a></li>
    78                             <li><a href="https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/"><?php esc_html_e( 'Plugin Assets (and how to use them)', 'wporg-plugins' ); ?></a></li>
    79                             <li><a href="https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/"><?php esc_html_e( 'Developer FAQ', 'wporg-plugins' ); ?></a></li>
    80                         </ul>
     74                        <h3><?php esc_html_e( 'Why can\'t I submit a plugin with certain display names?', 'wporg-plugins' ); ?></h3>
     75                        <p><?php echo wp_kses_post( __( 'Certain plugin names are prohibited due to trademark abuse. Similarly, we prevent their use in plugin slugs entirely for your protection.', 'wporg-plugins' ) ); ?></p>
    8176                    </div>
    8277                </section>
Note: See TracChangeset for help on using the changeset viewer.