Making WordPress.org

Ticket #4674: 4674.diff

File 4674.diff, 18.3 KB (added by Ipstenu, 5 years ago)
  • trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php

     
    114114                }
    115115
    116116                // Make sure it doesn't use a TRADEMARK protected slug.
    117                 if ( $this->has_trademarked_slug() ) {
    118                         $error = __( 'Error: The plugin has a trademarked name.', 'wporg-plugins' );
     117                if ( false !== $this->has_trademarked_slug() ) {
     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>'
    126127                        ) );
     
    134135
    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>'
    140141                        ) );
     
    146147
    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' ),
    152153                                'plugins@wordpress.org'
     
    159160
    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>'
    165166                        ) );
     
    170171
    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' )
    176177                        ) );
     
    181182
    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' )
    187188                        ) );
     
    221222                $readme = new Parser( $readme );
    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
    227228                if ( ! $result ) {
     
    229230
    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>'
    235236                        ) );
     
    304305
    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>'
    310311                ) . '</p><p>';
     
    336337        public function has_reserved_slug() {
    337338                $reserved_slugs = array(
    338339                        // Plugin Directory URL parameters.
     340                        'about',
     341                        'admin',
    339342                        'browse',
    340                         'tag',
    341                         'search',
     343                        'developers',
     344                        'developer',
     345                        'featured',
    342346                        'filter',
    343                         'upload',
    344                         'featured',
     347                        'jquery',
     348                        'new',
     349                        'page',
    345350                        'popular',
    346                         'new',
     351                        'post',
     352                        'search',
     353                        'tag',
    347354                        'updated',
    348                         'about',
    349                         'developers',
    350                         'admin',
     355                        'upload',
     356                        'wordpress',
    351357                        'wp-admin',
    352                         'wordpress',
    353                         'jquery',
    354358                );
    355359
    356360                return in_array( $this->plugin_slug, $reserved_slugs );
     
    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',
    377390                        'whatsapp',
     
    379392                        'woocommerce',
    380393                        'wordpress',
    381394                        'yoast',
     395                        'youtube',
    382396                );
    383397
    384398                $has_trademarked_slug = false;
     
    385399
    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                        }
    391405                }
     
    482496
    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.
     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.
    486500
    487 We recommend you review the following links to understand the review process and our expectations:
     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.
    488502
     503We remind you review the following links to understand the review process and our expectations:
     504
    489505Guidelines: https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/
    490506Frequently Asked Questions: https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/
    491507
  • trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/page-add.php

     
    2222                        </header><!-- .entry-header -->
    2323
    2424                        <div class="entry-content">
     25
    2526                                <section>
    2627                                        <div class="container">
    27                                                 <h2 id="faq"><?php esc_html_e( 'FAQ', 'wporg-plugins' ); ?></h2>
    28 
    29                                                 <h3><?php esc_html_e( 'How long will the review process take?', 'wporg-plugins' ); ?></h3>
    3028                                                <p>
    3129                                                        <?php
    3230                                                        printf(
    33                                                                 /* translators: URL to plugin developer FAQ. */
    34                                                                 wp_kses_post( __( 'This is in the <a href="%s">Developer FAQ</a>. It takes anywhere between 1 and 10 days. We attempt to review all plugins within 5 business days of submission, but the process takes as long as it takes, depending on the complexity of your plugin.', 'wporg-plugins' ) ),
     31                                                                /* translators: 1. URL to plugin developer Guidelines. */
     32                                                                wp_kses_post( __( 'Before you submit your plugin, we ask you review our <a href="%1$s">Guidelines</a> and read the <a href="%1$s">Frequently Asked Questions</a>. A brief selections of common questions are listed below the form.', 'wporg-plugins' ) ),
     33                                                                esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' ),
    3534                                                                esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/' )
    3635                                                        );
    3736                                                        ?>
    3837                                                </p>
    3938
    40                                                 <h3><?php esc_html_e( 'What will my plugin URL be?', 'wporg-plugins' ); ?></h3>
    41                                                 <p><?php echo wp_kses_post( __( 'Your plugin&#8217;s URL will be populated based on the value of <code>Plugin Name</code> in your main plugin file (the one with the plugin headers). If you set yours as <code>Plugin Name: Boaty McBoatface</code> then your URL will be <code>https://wordpress.org/plugins/boaty-mcboatface</code> and your slug will be <code>boaty-mcboatface</code> for example. If there is an existing plugin with your name, then you will be <code>boaty-mcboatface-2</code> and so on. It behaves exactly like WordPress post names.', 'wporg-plugins' ) ); ?></p>
    42                                                 <p><?php echo wp_kses_post( __( 'Once your plugin is approved, it <em>cannot</em> be renamed.', 'wporg-plugins' ) ); ?></p>
     39                                                <?php echo do_shortcode( '[wporg-plugin-upload]' ); ?>
    4340
    44                                                 <h3><?php esc_html_e( 'I made a mistake in my plugin name. Should I resubmit?', 'wporg-plugins' ); ?></h3>
    45                                                 <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>
    46 
    47                                                 <h3><?php esc_html_e( 'Why was I told my plugin name was unacceptable?', 'wporg-plugins' ); ?></h3>
    4841                                                <p>
    4942                                                        <?php
    5043                                                        printf(
    5144                                                                /* 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' ) ),
     45                                                                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' ) ),
    5346                                                                esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' )
    5447                                                        );
    5548                                                        ?>
    5649                                                </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>
    5850                                        </div>
    5951                                </section>
    6052
    6153                                <section>
    6254                                        <div class="container">
     55                                                <h2 id="faq"><?php esc_html_e( 'Frequently Asked Questions', 'wporg-plugins' ); ?></h2>
     56
     57                                                <h3><?php esc_html_e( 'How long will the review process take?', 'wporg-plugins' ); ?></h3>
    6358                                                <p>
    6459                                                        <?php
    6560                                                        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/' )
     61                                                                /* translators: URL to plugin developer FAQ. */
     62                                                                wp_kses_post( __( 'This is in the <a href="%s">Developer FAQ</a>. It takes anywhere between 1 and 10 days. We attempt to review all plugins within 5 business days of submission, but the process takes as long as it takes, depending on the complexity of your plugin.', 'wporg-plugins' ) ),
     63                                                                esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/' )
    6964                                                        );
    7065                                                        ?>
    7166                                                </p>
    7267
    73                                                 <?php echo do_shortcode( '[wporg-plugin-upload]' ); ?>
     68                                                <h3><?php esc_html_e( 'What will my plugin URL be?', 'wporg-plugins' ); ?></h3>
     69                                                <p><?php echo wp_kses_post( __( 'Your plugin&#8217;s URL will be populated based on the value of <code>Plugin Name</code> in your main plugin file (the one with the plugin headers). If you set yours as <code>Plugin Name: Boaty McBoatface</code> then your URL will be <code>https://wordpress.org/plugins/boaty-mcboatface</code> and your slug will be <code>boaty-mcboatface</code> for example. If there is an existing plugin with your name, then you will be <code>boaty-mcboatface-2</code> and so on. It behaves exactly like WordPress post names.', 'wporg-plugins' ) ); ?></p>
     70                                                <p><?php echo wp_kses_post( __( 'Once your plugin is approved, it <em>cannot</em> be renamed.', 'wporg-plugins' ) ); ?></p>
    7471
    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>
     72                                                <h3><?php esc_html_e( 'I made a mistake in my plugin name. Should I resubmit?', 'wporg-plugins' ); ?></h3>
     73                                                <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>
     74
     75                                                <h3><?php esc_html_e( 'Why can\'t I submit a plugin with certain display names?', 'wporg-plugins' ); ?></h3>
     76                                                <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>
    8177                                        </div>
    8278                                </section>
    8379                        </div><!-- .entry-content -->