Changeset 49614 for trunk/src/wp-admin/includes/post.php
- Timestamp:
- 11/16/2020 07:42:32 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r49544 r49614 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 689 683 $post_id = wp_insert_post( 690 684 array( 691 'post_title' => $default_title,685 'post_title' => __( 'Auto Draft' ), 692 686 'post_type' => $post_type, 693 687 'post_status' => 'auto-draft', … … 697 691 ); 698 692 $post = get_post( $post_id ); 699 700 if ( current_theme_supports( 'post-formats' ) 701 && post_type_supports( $post->post_type, 'post-formats' ) 702 && get_option( 'default_post_format' ) 703 ) { 693 if ( current_theme_supports( 'post-formats' ) && post_type_supports( $post->post_type, 'post-formats' ) && get_option( 'default_post_format' ) ) { 704 694 set_post_format( $post, get_option( 'default_post_format' ) ); 705 695 } 706 707 696 wp_after_insert_post( $post, false ); 708 697
Note: See TracChangeset
for help on using the changeset viewer.