Changeset 13292 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-parser.php
- Timestamp:
- 03/07/2024 02:46:32 AM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-parser.php
r13262 r13292 240 240 $this->name = $this->sanitize_text( trim( $line, "#= \t\0\x0B" ) ); 241 241 242 // It's possible to leave the plugin name header off entirely.. 243 if ( $this->parse_possible_header( $line, true /* only valid headers */ ) ) { 244 array_unshift( $contents, $line ); 245 246 $this->warnings['invalid_plugin_name_header'] = true; 247 $this->name = false; 248 } 249 242 250 // Strip Github style header\n==== underlines. 243 251 if ( ! empty( $contents ) && '' === trim( $contents[0], '=-' ) ) { … … 255 263 if ( strlen( $line ) < 50 && ! $this->parse_possible_header( $line, true /* only valid headers */ ) ) { 256 264 $this->name = $this->sanitize_text( trim( $line, "#= \t\0\x0B" ) ); 257 } 258 } 259 260 // It's possible to leave the plugin name header off entirely. 261 if ( $this->parse_possible_header( $this->name, true /* only valid headers */ ) ) { 262 array_unshift( $contents, $line ); 263 264 $this->warnings['invalid_plugin_name_header'] = true; 265 $this->name = false; 265 } else { 266 // Put it back on the stack to be processed. 267 array_unshift( $contents, $line ); 268 } 266 269 } 267 270
Note: See TracChangeset
for help on using the changeset viewer.