diff --git a/vendor/class-parser.php b/vendor/class-parser.php
index d1fdd51..dece4d7 100644
|
a
|
b
|
class Parser {
|
| 165 | 165 | * @return bool |
| 166 | 166 | */ |
| 167 | 167 | protected function parse_readme( $file ) { |
| 168 | | $contents = file_get_contents( $file ); |
| | 168 | /** |
| | 169 | * Filter $contents to allow for use outside of wp.org. |
| | 170 | * |
| | 171 | * @since x.x.x |
| | 172 | * |
| | 173 | * @param string $file |
| | 174 | * @return bool|string $contents Default is false. |
| | 175 | */ |
| | 176 | $contents = apply_filters( 'pre_parser_parse_readme', false, $file ); |
| | 177 | |
| | 178 | $contents = $contents ?: file_get_contents( $file ); |
| 169 | 179 | if ( preg_match( '!!u', $contents ) ) { |
| 170 | 180 | $contents = preg_split( '!\R!u', $contents ); |
| 171 | 181 | } else { |
| … |
… |
class Parser {
|
| 416 | 426 | } |
| 417 | 427 | } |
| 418 | 428 | |
| | 429 | /** |
| | 430 | * Action to allow post-processing of readme parsing for usage outside of wp.org. |
| | 431 | * |
| | 432 | * @since x.x.x |
| | 433 | */ |
| | 434 | do_action( 'post_parser_parse_readme' ); |
| | 435 | |
| 419 | 436 | // Filter the HTML. |
| 420 | 437 | $this->sections = array_map( array( $this, 'filter_text' ), $this->sections ); |
| 421 | 438 | |