Changeset 13618
- Timestamp:
- 04/30/2024 04:41:42 AM (3 months ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-parser.php
r13525 r13618 342 342 // Handle the many cases of "License: GPLv2 - http://..." 343 343 if ( empty( $headers['license_uri'] ) && preg_match( '!(https?://\S+)!i', $headers['license'], $url ) ) { 344 $headers['license_uri'] = $url[1]; 345 $headers['license'] = trim( str_replace( $url[1], '', $headers['license'] ), " -*\t\n\r\n" ); 346 } 344 $headers['license_uri'] = trim( $url[1], " -*\t\n\r\n(" ); 345 $headers['license'] = trim( str_replace( $url[1], '', $headers['license'] ), " -*\t\n\r\n(" ); 346 } 347 347 348 $this->license = $headers['license']; 348 349 } 349 350 if ( ! empty( $headers['license_uri'] ) ) { 350 351 $this->license_uri = $headers['license_uri']; 352 353 354 355 356 357 358 359 360 361 351 362 } 352 363 … … 920 931 } 921 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 922 1024 } -
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 ( ) ) { 148 148 $warnings['license_missing'] = true; 149 150 151 152 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.