diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index 1a9764543c..2a7dfab0b5 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -657,10 +657,6 @@ function wp_write_post() { if ( isset( $_POST['post_ID'] ) ) return edit_post(); - $translated = _wp_translate_postdata( false ); - if ( is_wp_error($translated) ) - return $translated; - if ( isset($_POST['visibility']) ) { switch ( $_POST['visibility'] ) { case 'public' : @@ -677,6 +673,10 @@ function wp_write_post() { } } + $translated = _wp_translate_postdata( false ); + if ( is_wp_error($translated) ) + return $translated; + // Create the post. $post_ID = wp_insert_post( $_POST ); if ( is_wp_error( $post_ID ) )