Changeset 6951
- Timestamp:
- 03/28/2018 04:10:20 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/inc/docs-importer.php
r6304 r6951 271 271 $markdown = preg_replace( '#^---(.+)---#Us', '', $markdown ); 272 272 273 $title = null;273 // Remove any level 1 headings at the start of the markdown 274 274 if ( preg_match( '/^#\s(.+)/', $markdown, $matches ) ) { 275 $title = $matches[1];276 275 $markdown = preg_replace( '/^#\s(.+)/', '', $markdown ); 277 276 } … … 293 292 'post_content' => wp_filter_post_kses( wp_slash( $html ) ), 294 293 ); 295 if ( ! is_null( $title ) ) { 296 $post_data['post_title'] = sanitize_text_field( wp_slash( $title ) ); 297 } 294 298 295 wp_update_post( $post_data ); 299 296 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)