Making WordPress.org

Changeset 11348


Ignore:
Timestamp:
11/30/2021 10:27:12 PM (2 years ago)
Author:
Ipstenu
Message:

Update the various checkers for restricted terms in plugins

Explain why terms are blocked in a less trademarky fashion

Attempting to block 'woopress' submissions

Fixes #5969

File:
1 edited

Legend:

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

    r11258 r11348  
    116116        // Make sure it doesn't use a TRADEMARK protected slug.
    117117        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' );
    119119
    120120            if ( $this->has_trademarked_slug() === trim( $this->has_trademarked_slug(), '-' ) ) {
     
    122122                $message = sprintf(
    123123                    /* 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' ),
    125125                    '<code>' . $this->plugin_slug . '</code>',
    126126                    trim( $this->has_trademarked_slug(), '-' ),
     
    132132                $message = sprintf(
    133133                    /* 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' ),
    135135                    '<code>' . $this->plugin_slug . '</code>',
    136136                    trim( $this->has_trademarked_slug(), '-' ),
     
    366366        ) . '</p><p>';
    367367
    368         $message .= __( 'If there are any errors in your submission, please email us as soon as possible. We can correct many issues 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>';
    369369
    370370        $message .= sprintf(
     
    376376
    377377        $message .= __( 'Note: Reviews are currently in English only. We apologize for the inconvenience.', 'wporg-plugins' );
     378
     379        $message .= '</p>';
    378380
    379381        // Success!
     
    445447            'apple-',
    446448            'applenews-',
     449            'applepay-',
    447450            'aws-',
     451            'azon-',
    448452            'bbpress-',
    449453            'bing-',
     454            'booking-com',
    450455            'bootstrap-',
    451456            'buddypress-',
    452457            'contact-form-7-',
     458            'cloudflare-',
    453459            'cpanel-',
    454460            'disqus-',
     
    464470            'fedex-',
    465471            'feedburner',
     472            'firefox-',
     473            'fontawesome-',
     474            'font-awesome-',
    466475            'ganalytics-',
    467476            'gberg',
     
    473482            'gravity-form-',
    474483            'gravity-forms-',
     484            'gravityforms-',
     485            'gtmetrix-',
    475486            'gutenberg',
    476487            'guten-',
     
    480491            'instagram',
    481492            'internet-explorer-',
     493            'ios-',
    482494            'jetpack-',
    483495            'macintosh-',
     496            'macos-',
    484497            'mailchimp-',
    485498            'microsoft-',
     
    488501            'onlyfans-',
    489502            'only-fans-',
     503            'opera-',
    490504            'paddle-',
    491505            'paypal-',
    492506            'pinterest-',
     507            'plugin',
     508            'skype-',
    493509            'stripe-',
    494510            'tiktok-',
     511            'tik-tok-',
    495512            'trustpilot',
     513            'twitch-',
    496514            'twitter-',
    497515            'tweet',
     
    503521            'vvoo',
    504522            'wa-',
     523            'webpush-vn',
    505524            'wh4tsapps',
    506525            'whatsapp',
     
    524543            'yoast',
    525544            'youtube-',
     545            'you-tube-',
    526546        );
    527547
     
    535555            'microsoft.com'         => array( 'bing-', 'microsoft-' ),
    536556            'yandex-team.ru'        => array( 'yandex' ),
     557            'opera.com'             => array( 'opera-' ),
    537558        );
    538559
     
    540561        $for_use_exceptions = array(
    541562            'woocommerce',
     563        );
     564
     565        // Commonly used 'combo' names (to prevent things like 'woopress').
     566        $portmanteaus = array(
     567            'woo',
    542568        );
    543569
     
    568594        }
    569595
     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
    570604        // Get the user email domain.
    571605        list( ,$user_email_domain ) = explode( '@', wp_get_current_user()->user_email, 2 );
Note: See TracChangeset for help on using the changeset viewer.