Ticket #4674: 4674.diff
File 4674.diff, 18.3 KB (added by , 5 years ago) |
---|
-
trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php
114 114 } 115 115 116 116 // 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' ); 119 119 120 120 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' ), 123 123 '<code>' . $this->plugin_slug . '</code>', 124 $this->has_trademarked_slug(), 124 125 '<code>Plugin Name:</code>', 125 126 '<code>plugins@wordpress.org</code>' 126 127 ) ); … … 134 135 135 136 return new \WP_Error( 'already_exists', $error . ' ' . sprintf( 136 137 /* 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 andupload 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' ), 138 139 '<code>' . $this->plugin_slug . '</code>', 139 140 '<code>Plugin Name:</code>' 140 141 ) ); … … 146 147 147 148 return new \WP_Error( 'already_submitted', $error . ' ' . sprintf( 148 149 /* 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' ), 150 151 '<code>' . $this->plugin_slug . '</code>', 151 152 __( 'https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/', 'wporg-plugins' ), 152 153 'plugins@wordpress.org' … … 159 160 160 161 return new \WP_Error( 'trademarked_name', $error . ' ' . sprintf( 161 162 /* 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 itagain.', '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' ), 163 164 '<code>' . $this->plugin_slug . '</code>', 164 165 '<code>Plugin Name:</code>' 165 166 ) ); … … 170 171 171 172 return new \WP_Error( 'no_description', $error . ' ' . sprintf( 172 173 /* 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' ), 174 175 '<code>Description:</code>', 175 176 __( 'https://developer.wordpress.org/plugins/the-basics/header-requirements/', 'wporg-plugins' ) 176 177 ) ); … … 181 182 182 183 return new \WP_Error( 'no_version', $error . ' ' . sprintf( 183 184 /* 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' ), 185 186 '<code>Version:</code>', 186 187 __( 'https://developer.wordpress.org/plugins/the-basics/header-requirements/', 'wporg-plugins' ) 187 188 ) ); … … 221 222 $readme = new Parser( $readme ); 222 223 223 224 // 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. 225 226 $result = $this->check_plugin(); 226 227 227 228 if ( ! $result ) { … … 229 230 230 231 return new \WP_Error( 'failed_checks', $error . ' ' . sprintf( 231 232 /* translators: 1: Plugin Check Plugin URL, 2: https://make.wordpress.org/plugins */ 232 __( 'Please correct the problems with theplugin 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' ), 233 234 '//wordpress.org/plugins/plugin-check/', 234 235 '<a href="https://make.wordpress.org/plugins">https://make.wordpress.org/plugins</a>' 235 236 ) ); … … 304 305 305 306 $message = sprintf( 306 307 /* 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 pluginslug 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.' ), 308 309 esc_html( $this->plugin['Name'] ), 309 310 '<code>' . $this->plugin_slug . '</code>' 310 311 ) . '</p><p>'; … … 336 337 public function has_reserved_slug() { 337 338 $reserved_slugs = array( 338 339 // Plugin Directory URL parameters. 340 'about', 341 'admin', 339 342 'browse', 340 'tag', 341 'search', 343 'developers', 344 'developer', 345 'featured', 342 346 'filter', 343 'upload', 344 'featured', 347 'jquery', 348 'new', 349 'page', 345 350 'popular', 346 'new', 351 'post', 352 'search', 353 'tag', 347 354 'updated', 348 'about', 349 'developers', 350 'admin', 355 'upload', 356 'wordpress', 351 357 'wp-admin', 352 'wordpress',353 'jquery',354 358 ); 355 359 356 360 return in_array( $this->plugin_slug, $reserved_slugs ); … … 364 368 public function has_trademarked_slug() { 365 369 $trademarked_slugs = array( 366 370 'contact-form-7', 371 'divi', 372 'easy-digital-downloads', 373 'elementor', 367 374 'facebook', 375 'feedburner', 368 376 'google', 369 377 '-gram', 370 378 'gram-', 379 'gravity-forms', 380 'gutenberg', 371 381 'instagram', 372 382 'insta', 383 'macintosh', 373 384 'microsoft', 374 'paypal', 385 'ninja-forms', 386 'pinterest', 387 'samsung', 375 388 'twitter', 376 389 'tweet', 377 390 'whatsapp', … … 379 392 'woocommerce', 380 393 'wordpress', 381 394 'yoast', 395 'youtube', 382 396 ); 383 397 384 398 $has_trademarked_slug = false; … … 385 399 386 400 foreach ( $trademarked_slugs as $trademark ) { 387 401 if ( false !== strpos( $this->plugin_slug, $trademark ) ) { 388 $has_trademarked_slug = true;402 $has_trademarked_slug = $trademark; 389 403 break; 390 404 } 391 405 } … … 482 496 483 497 Your 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. 484 498 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 themlater.499 If 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. 486 500 487 We recommend you review the following links to understand the review process and our expectations: 501 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. 488 502 503 We remind you review the following links to understand the review process and our expectations: 504 489 505 Guidelines: https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/ 490 506 Frequently Asked Questions: https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/ 491 507 -
trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/page-add.php
22 22 </header><!-- .entry-header --> 23 23 24 24 <div class="entry-content"> 25 25 26 <section> 26 27 <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>30 28 <p> 31 29 <?php 32 30 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/' ), 35 34 esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/' ) 36 35 ); 37 36 ?> 38 37 </p> 39 38 40 <h3><?php esc_html_e( 'What will my plugin URL be?', 'wporg-plugins' ); ?></h3> 41 <p><?php echo wp_kses_post( __( 'Your plugin’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]' ); ?> 43 40 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’t! Instead email <code>plugins@wordpress.org</code> and we can rename your plugin as long as it’s not approved. Since we check emails first, the odds are we’ll catch it. If we don’t, just email us and explain the mistake. We’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>48 41 <p> 49 42 <?php 50 43 printf( 51 44 /* 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 “plugin” and “WordPress”) will be removed for you, as those should not be used at all. We get it; you’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' ) ), 53 46 esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' ) 54 47 ); 55 48 ?> 56 49 </p> 57 <p><?php echo wp_kses_post( __( 'Regarding the names and trademarks of other companies and plugins, don’t use them at the start of your plugin name. If you’re not Facebook, you shouldn’t submit a plugin that uses <code>facebook</code> as the first term in your slug. “Facebook Like Sharer” (which would be <code>facebook-like-sharer</code>) is not acceptable, but “Like Sharer for Facebook” (which would be <code>like-sharer-for-facebook</code>) would be alright.', 'wporg-plugins' ) ); ?></p>58 50 </div> 59 51 </section> 60 52 61 53 <section> 62 54 <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> 63 58 <p> 64 59 <?php 65 60 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/' ) 69 64 ); 70 65 ?> 71 66 </p> 72 67 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’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> 74 71 75 <p><?php esc_html_e( 'Even if you’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’t! Instead email <code>plugins@wordpress.org</code> and we can rename your plugin as long as it’s not approved. Since we check emails first, the odds are we’ll catch it. If we don’t, just email us and explain the mistake. We’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> 81 77 </div> 82 78 </section> 83 79 </div><!-- .entry-content -->