Changeset 13460 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin-upload.php
- Timestamp:
- 04/05/2024 03:44:27 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin-upload.php
r13109 r13460 143 143 // Duplicated from Upload handler. 144 144 // Make sure it doesn't use a TRADEMARK protected slug. 145 if ( false !== $upload_handler->has_trademarked_slug() ) { 145 $has_trademarked_slug = Trademarks::check_slug( $slug, wp_get_current_user() ); 146 if ( $has_trademarked_slug ) { 146 147 $error = __( 'That plugin slug includes a restricted term.', 'wporg-plugins' ); 147 148 148 if ( $ upload_handler->has_trademarked_slug() === trim( $upload_handler->has_trademarked_slug(), '-' ) ) {149 if ( $has_trademarked_slug === trim( $has_trademarked_slug, '-' ) ) { 149 150 // Trademarks that do NOT end in "-" indicate slug cannot contain term at all. 150 151 $message = sprintf( … … 152 153 __( 'Your chosen plugin slug - %1$s - contains the restricted term "%2$s", which cannot be used at all in your plugin permalink nor the display name.', 'wporg-plugins' ), 153 154 '<code>' . $slug . '</code>', 154 trim( $upload_handler->has_trademarked_slug(), '-' )155 '<code>' . trim( $has_trademarked_slug, '-' ) . '</code>' 155 156 ); 156 157 } else { … … 160 161 __( 'Your chosen plugin slug - %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.', 'wporg-plugins' ), 161 162 '<code>' . $slug . '</code>', 162 trim( $upload_handler->has_trademarked_slug(), '-' )163 '<code>' . trim( $has_trademarked_slug, '-' ) . '</code>' 163 164 ); 164 165 }
Note: See TracChangeset
for help on using the changeset viewer.