Ticket #5969: 5969-2.patch
File 5969-2.patch, 7.1 KB (added by , 3 years ago) |
---|
-
trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php
115 115 116 116 // Make sure it doesn't use a TRADEMARK protected slug. 117 117 if ( false !== $this->has_trademarked_slug() ) { 118 $error = __( 'Error: The plugin includes a trademarked name.', 'wporg-plugins' );118 $error = __( 'Error: The plugin name includes a restricted term.', 'wporg-plugins' ); 119 119 120 120 if ( $this->has_trademarked_slug() === trim( $this->has_trademarked_slug(), '-' ) ) { 121 121 // Trademarks that do NOT end in "-" indicate slug cannot contain term at all. 122 122 $message = sprintf( 123 123 /* translators: 1: plugin slug, 2: trademarked term, 3: 'Plugin Name:', 4: plugin email address */ 124 __( 'Your chosen plugin name - %1$s - contains the restricted term "%2$s" and cannot be used at all in your plugin permalink nor the display name. To proceed with this submission you must remove "%2$s" from the %3$s line in both your main plugin file and readme entirely. Once you\'ve finished, you may upload the plugin again. Do not attempt to work around this by removing letters (i.e. WordPess) or using numbers (4 instead of A). Those are seen as intentional actions to avoid trademark laws, and are not permitted. If you feel this is in error, such as you legally own the trademarked term, please email us at %4$s and explain why.', 'wporg-plugins' ),124 __( 'Your chosen plugin name - %1$s - contains the restricted term "%2$s" and cannot be used at all in your plugin permalink nor the display name. To proceed with this submission you must remove "%2$s" from the %3$s line in both your main plugin file and readme entirely. Once you\'ve finished, you may upload the plugin again. Do not attempt to work around this by removing letters (i.e. WordPess) or using numbers (4 instead of A). Those are seen as intentional actions to avoid our restrictions, and are not permitted. If you feel this is in error, such as you legally own the trademark for a term, please email us at %4$s and explain your situation.', 'wporg-plugins' ), 125 125 '<code>' . $this->plugin_slug . '</code>', 126 126 trim( $this->has_trademarked_slug(), '-' ), 127 127 '<code>Plugin Name:</code>', … … 131 131 // Trademarks ending in "-" indicate slug cannot BEGIN with that term. 132 132 $message = sprintf( 133 133 /* translators: 1: plugin slug, 2: trademarked term, 3: 'Plugin Name:', 4: plugin email address */ 134 __( 'Your chosen plugin name - %1$s - contains the restricted term "%2$s" and cannot be used to begin your permalink or display name. Per the requirements of trademark owners and law, we disallow the use of certain terms in ways that are infringing and/or misleading. In order to proceed with this submission, you must change the %3$s line in your main plugin file and readme to end with "-%2$s" instead. Once you\'ve finished, you may upload the plugin again. If you feel this is in error, such as you legally own the trademarked term, please email us at %4$s and explain why.', 'wporg-plugins' ),134 __( 'Your chosen plugin name - %1$s - contains the restricted term "%2$s" and cannot be used to begin your permalink or display name. We disallow the use of certain terms in ways that are abused, or potentially infringe on and/or are misleading with regards to trademarks. In order to proceed with this submission, you must change the %3$s line in your main plugin file and readme to end with "-%2$s" instead. Once you\'ve finished, you may upload the plugin again. If you feel this is in error, such as you legally own the trademark for the term, please email us at %4$s and explain your situation.', 'wporg-plugins' ), 135 135 '<code>' . $this->plugin_slug . '</code>', 136 136 trim( $this->has_trademarked_slug(), '-' ), 137 137 '<code>Plugin Name:</code>', … … 365 365 'plugins@wordpress.org' 366 366 ) . '</p><p>'; 367 367 368 $message .= __( 'If there are any errors in your submission, please email us as soon as possible. We can correct manyissues before approval.', 'wporg-plugins' ) . '</p><p>';368 $message .= __( 'If there are any errors in your submission, such as having submitted via the wrong account, please don\'t resubmit! Instead, email us as soon as possible (you can reply to the automated email we sent you). We can correct most issues before approval.', 'wporg-plugins' ) . '</p><p>'; 369 369 370 370 $message .= sprintf( 371 371 /* translators: 1: URL to guidelines; 2: URL to FAQs; */ … … 376 376 377 377 $message .= __( 'Note: Reviews are currently in English only. We apologize for the inconvenience.', 'wporg-plugins' ); 378 378 379 $message .= '</p>'; 380 379 381 // Success! 380 382 return $message; 381 383 } … … 444 446 'android-', 445 447 'apple-', 446 448 'applenews-', 449 'applepay-', 447 450 'aws-', 451 'azon-', 448 452 'bbpress-', 449 453 'bing-', 454 'booking-com', 450 455 'bootstrap-', 451 456 'buddypress-', 452 457 'contact-form-7-', 458 'cloudflare-', 453 459 'cpanel-', 454 460 'disqus-', 455 461 'divi-', … … 463 469 'fb-messenger', 464 470 'fedex-', 465 471 'feedburner', 472 'firefox-', 473 'fontawesome-', 474 'font-awesome-', 466 475 'ganalytics-', 467 476 'gberg', 468 477 'github-', … … 472 481 'googles-', 473 482 'gravity-form-', 474 483 'gravity-forms-', 484 'gravityforms-', 485 'gtmetrix-', 475 486 'gutenberg', 476 487 'guten-', 477 488 'hubspot-', … … 479 490 'insta-', 480 491 'instagram', 481 492 'internet-explorer-', 493 'ios-', 482 494 'jetpack-', 483 495 'macintosh-', 496 'macos-', 484 497 'mailchimp-', 485 498 'microsoft-', 486 499 'ninja-forms-', … … 487 500 'oculus', 488 501 'onlyfans-', 489 502 'only-fans-', 503 'opera-', 490 504 'paddle-', 491 505 'paypal-', 492 506 'pinterest-', 507 'plugin', 508 'skype-', 493 509 'stripe-', 494 510 'tiktok-', 511 'tik-tok-', 495 512 'trustpilot', 513 'twitch-', 496 514 'twitter-', 497 515 'tweet', 498 516 'ups-', … … 502 520 'vva-', 503 521 'vvoo', 504 522 'wa-', 523 'webpush-vn', 505 524 'wh4tsapps', 506 525 'whatsapp', 507 526 'whats-app', … … 523 542 'yahoo-', 524 543 'yoast', 525 544 'youtube-', 545 'you-tube-', 526 546 ); 527 547 528 548 // Domains from which exceptions would be accepted. … … 534 554 'trustpilot.com' => array( 'trustpilot' ), 535 555 'microsoft.com' => array( 'bing-', 'microsoft-' ), 536 556 'yandex-team.ru' => array( 'yandex' ), 557 'opera.com' => array( 'opera-' ), 537 558 ); 538 559 539 560 // Trademarks that are allowed as 'for-whatever' ONLY. … … 541 562 'woocommerce', 542 563 ); 543 564 565 // Commonly used 'combo' names (to prevent things like 'woopress'). 566 $portmanteaus = array( 567 'woo', 568 ); 569 544 570 $has_trademarked_slug = false; 545 571 546 572 foreach ( $trademarked_slugs as $trademark ) { … … 567 593 } 568 594 } 569 595 596 // Check portmanteaus. 597 foreach ( $portmanteaus as $portmanteau ) { 598 if ( 0 === strpos( $this->plugin_slug, $portmanteau ) ) { 599 $has_trademarked_slug = $portmanteau; 600 break; 601 } 602 } 603 570 604 // Get the user email domain. 571 605 list( ,$user_email_domain ) = explode( '@', wp_get_current_user()->user_email, 2 ); 572 606