WordPress.org

Make WordPress Core

Ticket #20900: 20900.diff

File 20900.diff, 625 bytes (added by georgestephanis, 23 months ago)
  • wp-admin/includes/post.php

     
    404404function get_default_post_to_edit( $post_type = 'post', $create_in_db = false ) { 
    405405        global $wpdb; 
    406406 
     407        if ( ! post_type_exists( $post_type ) ) 
     408                return new WP_Error( 'bad-post-type', sprintf( __( 'The specified post type “%s” does not exist.' ), $post_type ) ); 
     409 
    407410        $post_title = ''; 
    408411        if ( !empty( $_REQUEST['post_title'] ) ) 
    409412                $post_title = esc_html( stripslashes( $_REQUEST['post_title'] ));