Changeset 13133 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-validator.php
- Timestamp:
- 01/22/2024 01:13:35 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-validator.php
r12614 r13133 72 72 73 73 // Fatal errors. 74 if ( empty( $readme->name ) ) {74 if ( empty( $readme->name ) || isset( $readme->warnings['invalid_plugin_name_header'] ) ) { 75 75 $errors[] = sprintf( 76 76 /* translators: 1: 'Plugin Name' section title, 2: 'Plugin Name' */ … … 145 145 } 146 146 147 if ( isset( $readme->warnings['too_many_tags'] ) ) { 148 $warnings[] = __( 'One or more tags were ignored. Please limit your plugin to 5 tags.', 'wporg-plugins' ); 149 } 150 151 if ( isset( $readme->warnings['ignored_tags'] ) ) { 152 $warnings[] = sprintf( 153 /* translators: %s: list of tags not supported */ 154 __( 'One or more tags were ignored. The following tags are not permitted: %s', 'wporg-plugins' ), 155 '<code>' . implode( '</code>, <code>', $readme->ignore_tags ) . '</code>' 156 ); 157 } 158 147 159 // Notes. 148 160 if ( empty( $readme->requires ) ) { … … 162 174 } 163 175 176 if ( isset( $readme->warnings['no_short_description_present'] ) ) { 177 $notes[] = sprintf( 178 /* translators: %s: section title */ 179 __( 'The %s section is missing. An excerpt was generated from your main plugin description.', 'wporg-plugins' ), 180 '<code>Short Description</code>' 181 ); 182 } elseif( isset( $readme->warnings['trimmed_short_description'] ) ) { 183 $notes[] = sprintf( 184 /* translators: %s: section title */ 185 __( 'The %s section is too long and was truncated. A maximum of 150 characters is supported.', 'wporg-plugins' ), 186 '<code>Short Description</code>' 187 ); 188 } 189 164 190 if ( empty( $readme->sections['faq'] ) ) { 165 191 $notes[] = sprintf(
Note: See TracChangeset
for help on using the changeset viewer.