Ticket #5083: trademark-changes.diff
File trademark-changes.diff, 6.5 KB (added by , 4 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() ) {117 if ( false !== $this->has_trademarked_slug() ) { 118 118 $error = __( 'Error: The plugin includes a trademarked name.', 'wporg-plugins' ); 119 119 120 return new \WP_Error( 'trademarked_name', $error . ' ' . sprintf( 121 /* translators: 1: plugin slug, 2: trademarked term, 3: 'Plugin Name:', 4: plugin email address */ 122 __( 'Your chosen plugin name - %1$s - contains the restricted term "%2$s" and cannot be used. Per the demands of trademark owners and in order to protect developers, we disallow the use of certain terms in ways that are infringing or misleading. In many cases, renaming your plugin to end with "for-%2$s" instead will resolve this issue. To do this, please change the %3$s line in your main plugin file and readme and upload the plugin again. If you feel this is in error, please email us at %4$s and explain why.', 'wporg-plugins' ), 123 '<code>' . $this->plugin_slug . '</code>', 124 $this->has_trademarked_slug(), 125 '<code>Plugin Name:</code>', 126 '<code>plugins@wordpress.org</code>' 127 ) ); 120 if ( $this->has_trademarked_slug() === trim( $this->has_trademarked_slug(), '-' ) ) { 121 $message = sprintf( 122 /* translators: 1: plugin slug, 2: trademarked term, 3: 'Plugin Name:', 4: plugin email address */ 123 __( 'Your chosen plugin name - %1$s - contains the restricted term "%2$s" and cannot be used. Per the demands of trademark owners and in order to protect developers, we disallow the use of certain terms in ways that are infringing or misleading. In this case, we have been required to prohibit the use of the term at all. To proceed with your submission, you must change the %3$s line in your main plugin file and readme and upload the plugin again. If you feel this is in error, please email us at %4$s and explain why.', 'wporg-plugins' ), 124 '<code>' . $this->plugin_slug . '</code>', 125 trim( $this->has_trademarked_slug(), '-' ), 126 '<code>Plugin Name:</code>', 127 '<code>plugins@wordpress.org</code>' 128 ); 129 } else { 130 $message = sprintf( 131 /* translators: 1: plugin slug, 2: trademarked term, 3: 'Plugin Name:', 4: plugin email address */ 132 __( 'Your chosen plugin name - %1$s - contains the restricted term "%2$s" and cannot be used. Per the demands of trademark owners and in order to protect developers, we disallow the use of certain terms in ways that are infringing or misleading. Renaming your plugin to end with "for-%2$s" instead will resolve this issue. To do this, please change the %3$s line in your main plugin file and readme and upload the plugin again. If you feel this is in error, please email us at %4$s and explain why.', 'wporg-plugins' ), 133 '<code>' . $this->plugin_slug . '</code>', 134 trim( $this->has_trademarked_slug(), '-' ), 135 '<code>Plugin Name:</code>', 136 '<code>plugins@wordpress.org</code>' 137 ); 138 } 139 140 141 return new \WP_Error( 'trademarked_name', $error . ' ' . $message ); 128 142 } 129 143 130 144 $plugin_post = Plugin_Directory::get_plugin_post( $this->plugin_slug ); … … 376 390 public function has_trademarked_slug() { 377 391 $trademarked_slugs = array( 378 392 'adobe-', 393 'adsense-', 379 394 'advanced-custom-fields-', 395 'adwords-', 380 396 'amazon-', 397 'android-', 398 'apple-', 399 'bing-', 381 400 'contact-form-7-', 382 401 'divi-', 383 402 'easy-digital-downloads-', … … 389 408 'gravity-forms-', 390 409 'gutenberg', 391 410 'instagram', 392 'insta',393 411 'macintosh-', 394 412 'microsoft-', 395 413 'ninja-forms-', 414 'paypal-', 396 415 'pinterest-', 416 'stripe-', 397 417 'twitter-', 398 418 'tweet', 399 419 'whatsapp', 400 420 'whats-app', 401 421 'woocommerce-', 422 'woo-', 402 423 'wordpress', 403 424 'yoast', 404 425 'youtube-', … … 408 429 409 430 foreach ( $trademarked_slugs as $trademark ) { 410 431 if ( false !== strpos( $this->plugin_slug, $trademark ) ) { 411 $has_trademarked_slug = trim( $trademark, '-' );432 $has_trademarked_slug = $trademark; 412 433 break; 413 434 } 414 435 } … … 457 478 458 479 echo '<h4>' . sprintf( __( 'Results of Automated Plugin Scanning: %s', 'wporg-plugins' ), vsprintf( '<span class="%1$s">%2$s</span>', $verdict ) ) . '</h4>'; 459 480 echo '<ul class="tc-result">' . __( 'Result', 'wporg-plugins' ) . '</ul>'; 460 echo '<div class="notice notice-info"><p>' . __( 'Note: While the automated plugin scan is based on the Plugin Review Guidelines, it is not a complete review. A successful result from the scan does not guarantee that the plugin will pass review. All submitted plugins are reviewed manuallybefore approval.', 'wporg-plugins' ) . '</p></div>';481 echo '<div class="notice notice-info"><p>' . __( 'Note: While the automated plugin scan is based on the Plugin Review Guidelines, it is not a complete review. A successful result from the scan does not guarantee that the plugin will be approved, only that it is sufficient to be reviewed. All submitted plugins are checked manually to ensure they meet security and guideline standards before approval.', 'wporg-plugins' ) . '</p></div>'; 461 482 462 483 return $result; 463 484 } … … 503 524 __( 504 525 '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. 505 526 506 Your plugin has been given the initial slugof %2$s based on your display name of %1$s. This is subject to change based on the results of your review.527 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. 507 528 508 If you need to change the plugin slug, 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.529 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. 509 530 510 531 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. 511 532