Changeset 8470
- Timestamp:
- 03/16/2019 10:24:06 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php
r7805 r8470 78 78 79 79 return new \WP_Error( 'no_name', $error . ' ' . sprintf( 80 /* translators: 1: plugin header line, 2: CodexURL */81 __( 'Add a %1$s line to your main plugin file and upload the plugin again. <a href="%2$s">Plugin Headers</a>', 'wporg-plugins' ),80 /* translators: 1: plugin header line, 2: Documentation URL */ 81 __( 'Add a %1$s line to your main plugin file and upload the plugin again. For more information, please review our documentation on <a href="%2$s">Plugin Headers</a>.', 'wporg-plugins' ), 82 82 '<code>Plugin Name:</code>', 83 __( 'https:// codex.wordpress.org/File_Header', 'wporg-plugins' )83 __( 'https://developer.wordpress.org/plugins/plugin-basics/header-requirements/', 'wporg-plugins' ) 84 84 ) ); 85 85 } … … 96 96 return new \WP_Error( 'unsupported_name', $error . ' ' . sprintf( 97 97 /* translators: %s: 'Plugin Name:' */ 98 __( 'Plugin names canonly contain latin letters (A-z), numbers, spaces, and hyphens. Please change the %s line in your main plugin file and upload it again.', 'wporg-plugins' ),98 __( 'Plugin names may only contain latin letters (A-z), numbers, spaces, and hyphens. Please change the %s line in your main plugin file and upload it again.', 'wporg-plugins' ), 99 99 esc_html( $this->plugin['Name'] ), 100 100 '<code>Plugin Name:</code>' … … 122 122 return new \WP_Error( 'already_exists', $error . ' ' . sprintf( 123 123 /* translators: 1: plugin slug, 2: 'Plugin Name:' */ 124 __( 'There is already a plugin called %1$s by a different author. Please changethe %2$s line in your main plugin file and upload it again.', 'wporg-plugins' ),124 __( '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 and upload it again.', 'wporg-plugins' ), 125 125 '<code>' . $this->plugin_slug . '</code>', 126 126 '<code>Plugin Name:</code>' … … 133 133 134 134 return new \WP_Error( 'already_submitted', $error . ' ' . sprintf( 135 /* translators: 1: plugin slug, 2: plugins@wordpress.org */136 __( 'You have already submitted a plugin called %1$s. Please be patient and wait for a review. If you have made a mistake, email <a href="mailto:%2$s">%2$s</a> and let us know.', 'wporg-plugins' ),135 /* translators: 1: plugin slug, 2: Documentation URL, 3: plugins@wordpress.org */ 136 __( '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' ), 137 137 '<code>' . $this->plugin_slug . '</code>', 138 __( 'https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/', 'wporg-plugins' ), 138 139 'plugins@wordpress.org' 139 140 ) ); … … 145 146 return new \WP_Error( 'no_description', $error . ' ' . sprintf( 146 147 /* translators: 1: plugin header line, 2: Documentation URL */ 147 __( 'Add a %1$s line to your main plugin file and upload the plugin again. <a href="%2$s">Plugin Headers</a>', 'wporg-plugins' ),148 __( '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' ), 148 149 '<code>Description:</code>', 149 150 __( 'https://developer.wordpress.org/plugins/the-basics/header-requirements/', 'wporg-plugins' ) … … 156 157 return new \WP_Error( 'no_version', $error . ' ' . sprintf( 157 158 /* translators: 1: plugin header line, 2: Documentation URL */ 158 __( 'Add a %1$s line to your main plugin file and upload the plugin again. <a href="%2$s">Plugin Headers</a>', 'wporg-plugins' ),159 __( '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' ), 159 160 '<code>Version:</code>', 160 161 __( 'https://developer.wordpress.org/plugins/the-basics/header-requirements/', 'wporg-plugins' ) … … 167 168 return new \WP_Error( 'invalid_version', $error . ' ' . sprintf( 168 169 /* translators: %s: 'Version:' */ 169 __( 'Version strings can only contain numeric and period characters ( like 1.2). Please fixthe %s line in your main plugin file and upload the plugin again.', 'wporg-plugins' ),170 __( 'Version strings can only contain numeric and period characters (i.e. 1.2). Please correct the %s line in your main plugin file and upload the plugin again.', 'wporg-plugins' ), 170 171 '<code>Version:</code>' 171 172 ) ); … … 178 179 return new \WP_Error( 179 180 'plugin_author_uri', $error . ' ' . 180 __( 'A plugin UR L is a page/site that provides details about this specific plugin. An author URL is a page/site that provides information about the author of the plugin. You are not required to provide both, so pick the one that best applies to your URL.', 'wporg-plugins' )181 __( 'A plugin URI (Unique Record Indicator) is a webpage that provides details about this specific plugin. An author URI is a webpage that provides information about the author of the plugin. Those two URIs must be different. You are not required to provide both, so pick the one that best applies to your situation.', 'wporg-plugins' ) 181 182 ); 182 183 } … … 203 204 204 205 return new \WP_Error( 'failed_checks', $error . ' ' . sprintf( 205 /* translators: 1: Plugin Check Plugin URL, 2: make.wordpress.org/plugins */206 /* translators: 1: Plugin Check Plugin URL, 2: https://make.wordpress.org/plugins */ 206 207 __( 'Please correct the problems with the 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' ), 207 208 '//wordpress.org/plugins/plugin-check/', … … 277 278 do_action( 'plugin_upload', $this->plugin, $plugin_post ); 278 279 279 /* translators: 1: plugin name, 2: plugin slug, 3: plugins@wordpress.org */280 280 $message = sprintf( 281 __( 'Thank you for uploading %1$s to the WordPress Plugin Directory. It has been given the initial plugin slug of %2$s, however that is subject to change based on the results of your code review.' ), 281 /* translators: 1: plugin name, 2: plugin slug, 3: plugins@wordpress.org */ 282 __( 'Thank you for uploading %1$s to the WordPress Plugin Directory. It has been given the initial plugin 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.' ), 282 283 esc_html( $this->plugin['Name'] ), 283 284 '<code>' . $this->plugin_slug . '</code>' 284 285 ) . '</p><p>'; 285 286 286 /* translators: 1: plugins@wordpress.org */287 287 $message .= sprintf( 288 /* translators: 1: plugins@wordpress.org */ 288 289 __( 'We’ve sent you an email verifying this submission. Please make sure to whitelist our email address - <a href="mailto:%1$s">%1$s</a> - to ensure you receive all our communications.' ), 289 290 'plugins@wordpress.org' 290 291 ) . '</p><p>'; 291 292 292 $message .= __( 'If there is any error in your submission, please email us as we can correct many issues before approval.', 'wporg-plugins' ) . '</p><p>'; 293 // Warn if the plugin starts with a reserved slug. 294 if ( $this->starts_with_reserved_slug() ) { 295 $message .= sprintf( 296 /* translators: %s: plugin name */ 297 __( 'Warning: Your plugin will probably need to be renamed. Your chosen plugin name - %s - starts with a term that may belong to another company. When we review your submision we will either correct this for you or request you approve a new name.' ), 298 esc_html( $this->plugin['Name'] ) 299 ) . '</p><p>'; 300 } 301 302 $message .= __( 'If there is any error in your submission, please email us as soon as possible. We can correct many issues before approval.', 'wporg-plugins' ) . '</p><p>'; 293 303 294 304 $message .= sprintf( … … 331 341 332 342 /** 343 * Whether the uploaded plugin uses a slug commonly abused by non-reps. 344 * 345 * @return bool 346 */ 347 public function starts_with_reserved_slug() { 348 $abused_slugs = array( 349 'apple', 350 'facebook', 351 'google', 352 'ios', 353 'jetpack', 354 'microsoft', 355 'paypal', 356 'twitter', 357 'woocommerce', 358 'wordpress', 359 'yoast', 360 ); 361 362 // Get the slug in an array. 363 $slug = explode( '-', $this->plugin_slug ); 364 365 // If the slug is the same as the first term, flag for abuse. 366 return in_array( $slug[0], $abused_slugs ); 367 } 368 369 /** 333 370 * Find the plugin readme file. 334 371 * … … 340 377 $files = Filesystem::list_files( $this->plugin_root, false /* non-recursive */, '!^readme\.(txt|md)$!i' ); 341 378 342 // Prioritize readme.txt 379 // Prioritize readme.txt file. 343 380 foreach ( $files as $file ) { 344 381 if ( '.txt' === strtolower( substr( $file, -4 ) ) ) { … … 359 396 // Run the checks. 360 397 // @todo Include plugin checker. 361 // pass $this->plugin_root as the plugin root398 // Pass $this->plugin_root as the plugin root. 362 399 $result = true; 363 400 … … 405 442 /* translators: %s: plugin name */ 406 443 $email_subject = sprintf( 407 __( '[WordPress Plugin Directory] New Plugin - %s', 'wporg-plugins' ),444 __( '[WordPress Plugin Directory] Successful Plugin Submission - %s', 'wporg-plugins' ), 408 445 $this->plugin['Name'] 409 446 ); … … 416 453 Your plugin has been given the initial slug of %2$s, however this is subject to change based on the results of your review. 417 454 418 If there is any problem with this 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 , so if you do not let us know of yourrequirements now, we will be unable to honor them later.419 420 We recommend you review the following links to understand the 455 If there is any problem with this 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 them later. 456 457 We recommend you review the following links to understand the review process and our expectations: 421 458 422 459 Guidelines: https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/
Note: See TracChangeset
for help on using the changeset viewer.