Changeset 13618 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-validator.php
- Timestamp:
- 04/30/2024 04:41:42 AM (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-validator.php
r13524 r13618 145 145 } 146 146 147 if ( empty( $readme->license) ) {147 if ( ! empty( $readme->warnings['license_missing'] ) ) { 148 148 $warnings['license_missing'] = true; 149 } elseif ( ! empty( $readme->warnings['invalid_license'] ) ) { 150 $errors['invalid_license'] = $readme->warnings['invalid_license']; 151 } elseif ( ! empty( $readme->warnings['unknown_license'] ) ) { 152 $notes['unknown_license'] = $readme->warnings['unknown_license']; 149 153 } 150 154 … … 398 402 case 'donate_link_missing': 399 403 return __( 'No donate link was found', 'wporg-plugins' ); 404 400 405 case 'license_missing': 401 406 return sprintf( 402 /* translators: 1: 'License' */ 403 __( 'The %1$s field is missing or invalid. A GPLv2 or later compatible license should be specified.', 'wporg-plugins' ), 404 '<code>License</code>' 407 /* translators: 1: 'License', 2: Link to a compatible licenses page. */ 408 __( 'The %1$s field is missing. <a href="%2$s">A GPLv2 or later compatible license</a> should be specified.', 'wporg-plugins' ), 409 '<code>License</code>', 410 'https://www.gnu.org/licenses/license-list.en.html' 411 ); 412 413 case 'invalid_license': 414 return sprintf( 415 /* translators: 1: 'License', 2: Link to a compatible licenses page. */ 416 __( 'The %1$s field appears to be invalid. <a href="%2$s">A GPLv2 or later compatible license</a> should be specified.', 'wporg-plugins' ), 417 '<code>License</code>', 418 'https://www.gnu.org/licenses/license-list.en.html' 419 ); 420 421 case 'unknown_license': 422 return sprintf( 423 /* translators: 1: 'License', 2: Link to a compatible licenses page. */ 424 __( 'The %1$s field could not be validated. <a href="%2$s">A GPLv2 or later compatible license</a> should be specified. The specified license may be compatible.', 'wporg-plugins' ), 425 '<code>License</code>', 426 'https://www.gnu.org/licenses/license-list.en.html' 405 427 ); 406 428
Note: See TracChangeset
for help on using the changeset viewer.