From e70e4e74fad4f0417f687fae6a886e63fab94527 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 30 Mar 2015 14:39:26 +0000 Subject: [PATCH] Press This: Use the error message returned by `wp_update_post()` instead of a generic one. props stephdau. fixes #31808. Built from https://develop.svn.wordpress.org/trunk@31930 git-svn-id: http://core.svn.wordpress.org/trunk@31909 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-press-this.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/class-wp-press-this.php b/wp-admin/includes/class-wp-press-this.php index 7b0c75cb1c..d5edd17a15 100644 --- a/wp-admin/includes/class-wp-press-this.php +++ b/wp-admin/includes/class-wp-press-this.php @@ -136,8 +136,8 @@ class WP_Press_This { $updated = wp_update_post( $post, true ); - if ( is_wp_error( $updated ) || intval( $updated ) < 1 ) { - wp_send_json_error( array( 'errorMessage' => __( 'Error while saving the post. Please try again later.' ) ) ); + if ( is_wp_error( $updated ) ) { + wp_send_json_error( array( 'errorMessage' => $updated->get_error_message() ) ); } else { if ( isset( $post['post_format'] ) ) { if ( current_theme_supports( 'post-formats', $post['post_format'] ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 3b55b73b2f..ba4850a174 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-beta3-31929'; +$wp_version = '4.2-beta3-31930'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.