diff --git wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-parser.php wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-parser.php
index cc3dc4188..3698b73f1 100644
|
|
class Parser { |
94 | 94 | */ |
95 | 95 | public $warnings = array(); |
96 | 96 | |
| 97 | /** |
| 98 | * Any readme.txt file larger than this will receive a warning |
| 99 | * |
| 100 | * @var integer |
| 101 | */ |
| 102 | private $README_WARNING_KB_SIZE = 8; |
| 103 | |
97 | 104 | /** |
98 | 105 | * These are the readme sections that we expect. |
99 | 106 | * |
… |
… |
class Parser { |
329 | 336 | $current .= $line . "\n"; |
330 | 337 | } |
331 | 338 | |
| 339 | // Check the file size |
| 340 | if( $this->show_filesize_warning( $file ) ) { |
| 341 | $this->warnings['filesize_warning'] = true; |
| 342 | } |
| 343 | |
332 | 344 | if ( ! empty( $section_name ) ) { |
333 | 345 | $this->sections[ $section_name ] .= trim( $current ); |
334 | 346 | } |
… |
… |
class Parser { |
772 | 784 | |
773 | 785 | return true; |
774 | 786 | } |
| 787 | |
| 788 | /** |
| 789 | * @access protected |
| 790 | * |
| 791 | * @param string $file |
| 792 | * @return string |
| 793 | */ |
| 794 | protected function show_filesize_warning( $file ) { |
| 795 | return ( strlen( $file ) / 1024 ) > $this->README_WARNING_KB_SIZE; |
| 796 | } |
| 797 | |
775 | 798 | } |
diff --git wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-validator.php wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-validator.php
index 7e984c648..46a6088cb 100644
|
|
class Validator { |
139 | 139 | ); |
140 | 140 | } |
141 | 141 | |
| 142 | if ( isset( $readme->warnings['filesize_warning'] ) ) { |
| 143 | $warnings[] = __( 'Your readme file is large. Try to reduce content to keep it more concise.', 'wporg-plugins' ); |
| 144 | } |
| 145 | |
142 | 146 | // Notes. |
143 | 147 | if ( empty( $readme->requires ) ) { |
144 | 148 | $notes[] = sprintf( |