Changeset 13119
- Timestamp:
- 01/16/2024 08:22:47 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-markdown/inc/class-importer.php
r13090 r13119 487 487 $markdown = trim( $markdown ); 488 488 489 // Use the first sentence as the excerpt.490 $excerpt = '';491 if ( preg_match( '/^(.+)/', $markdown, $matches ) ) {492 $excerpt = $matches[1];493 }494 495 489 // Transform to HTML and save the post 496 490 $parser = new WPCom_GHF_Markdown_Parser(); … … 499 493 500 494 $html = apply_filters( 'wporg_markdown_after_transform', $html, $this->get_post_type() ); 495 496 // Use the first line as the excerpt, but first strip any HTML. 497 $excerpt = ''; 498 if ( preg_match( '/^(.+)/', wp_strip_all_tags( $html ), $matches ) ) { 499 $excerpt = $matches[1]; 500 } 501 501 502 502 add_filter( 'wp_kses_allowed_html', [ $this, 'wp_kses_allow_links' ], 10, 2 );
Note: See TracChangeset
for help on using the changeset viewer.