Ticket #6457: 6457.diff

File 6457.diff, 1.4 kB (added by guillep2k, 3 months ago)
  • wp-admin/post.php

    old new  
    2626                else 
    2727                        $location = "post.php?action=edit&post=$post_ID&message=4"; 
    2828        } elseif (isset($_POST['addmeta']) && $_POST['addmeta']) { 
    29                 $location = add_query_arg( 'message', 2, wp_get_referer() ); 
    30                 $location = explode('#', $location); 
    31                 $location = $location[0] . '#postcustom'; 
     29                if( !empty($_POST['temp_ID']) && $_POST['temp_ID'] ) { 
     30                        $location = "post.php?action=edit&post=$post_ID&message=2#postcustom"; 
     31                } else { 
     32                        $location = add_query_arg( 'message', 2, wp_get_referer() ); 
     33                        $location = explode('#', $location); 
     34                        $location = $location[0] . '#postcustom'; 
     35                } 
    3236        } elseif (isset($_POST['deletemeta']) && $_POST['deletemeta']) { 
    3337                $location = add_query_arg( 'message', 3, wp_get_referer() ); 
    3438                $location = explode('#', $location); 
  • wp-includes/post.php

    old new  
    11301130                $previous_status = 'new'; 
    11311131        } 
    11321132 
    1133         if ( ('' == $post_content) && ('' == $post_title) && ('' == $post_excerpt) ) 
    1134                 return 0; 
    1135  
    11361133        // Make sure we set a valid category 
    11371134        if (0 == count($post_category) || !is_array($post_category)) { 
    11381135                $post_category = array(get_option('default_category'));