Changeset 49288
- Timestamp:
- 10/23/2020 07:07:09 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r49172 r49288 681 681 682 682 if ( $create_in_db ) { 683 if ( post_type_supports( $post_type, 'title' ) ) { 684 $default_title = __( 'Auto Draft' ); 685 } else { 686 $default_title = __( '(no title supported)' ); 687 } 688 683 689 $post_id = wp_insert_post( 684 690 array( 685 'post_title' => __( 'Auto Draft' ),691 'post_title' => $default_title, 686 692 'post_type' => $post_type, 687 693 'post_status' => 'auto-draft', … … 691 697 ); 692 698 $post = get_post( $post_id ); 693 if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) && get_option( 'default_post_format' ) ) { 699 700 if ( current_theme_supports( 'post-formats' ) 701 && post_type_supports( $post->post_type, 'post-formats' ) 702 && get_option( 'default_post_format' ) 703 ) { 694 704 set_post_format( $post, get_option( 'default_post_format' ) ); 695 705 } 706 696 707 wp_after_insert_post( $post, false ); 697 708
Note: See TracChangeset
for help on using the changeset viewer.