WordPress 3.8.3 wordpress-3.8.3
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Wed, 21 May 2014 23:17:33 +0000 (16:17 -0700)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Wed, 21 May 2014 23:17:33 +0000 (16:17 -0700)
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
readme.html
wp-admin/about.php
wp-admin/includes/post.php
wp-admin/includes/upgrade.php
wp-includes/version.php

index 35172352eaa447c99bb554fdfcd6323c42cf53fa..dbcd9a6d11eeee996dd0b8df78e484461573bb30 100644 (file)
@@ -9,7 +9,7 @@
 <body>
 <h1 id="logo">
        <a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" /></a>
-       <br /> Version 3.8.2
+       <br /> Version 3.8.3
 </h1>
 <p style="text-align: center">Semantic Personal Publishing Platform</p>
 
index aa8a10693680fd5a6f3f97d7948bbe489ecf9402..ce9c80226d51d79b8be571e0940428b975c3b2b2 100644 (file)
@@ -39,7 +39,11 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
 </h2>
 
 <div class="changelog point-releases">
-       <h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 2 ); ?></h3>
+       <h3><?php echo _n( 'Maintenance and Security Release', 'Maintenance and Security Releases', 3 ); ?></h3>
+       <p><?php printf( _n( '<strong>Version %1$s</strong> addressed %2$s bug.',
+               '<strong>Version %1$s</strong> addressed %2$s bugs.', 2 ), '3.8.3', number_format_i18n( 2 ) ); ?>
+               <?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.8.3' ); ?>
+       </p>
        <p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
          '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 9 ), '3.8.2', number_format_i18n( 9 ) ); ?>
                <?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'http://codex.wordpress.org/Version_3.8.2' ); ?>
index bd624979caf0016c962360cc25da17ec9ad984ca..11aa9cf8f568b96a63b503e5e3603c08604c361d 100644 (file)
@@ -203,10 +203,6 @@ function edit_post( $post_data = null ) {
                        _wp_upgrade_revisions_of_post( $post, wp_get_post_revisions( $post_ID ) );
        }
 
-       if ( ( empty( $post_data['action'] ) || 'autosave' != $post_data['action'] ) && 'auto-draft' == $post_data['post_status'] ) {
-               $post_data['post_status'] = 'draft';
-       }
-
        if ( isset($post_data['visibility']) ) {
                switch ( $post_data['visibility'] ) {
                        case 'public' :
@@ -227,6 +223,10 @@ function edit_post( $post_data = null ) {
        if ( is_wp_error($post_data) )
                wp_die( $post_data->get_error_message() );
 
+       if ( ( empty( $post_data['action'] ) || 'autosave' != $post_data['action'] ) && 'auto-draft' == $post_data['post_status'] ) {
+               $post_data['post_status'] = 'draft';
+       }
+
        // Post Formats
        if ( isset( $post_data['post_format'] ) )
                set_post_format( $post_ID, $post_data['post_format'] );
@@ -411,7 +411,12 @@ function bulk_edit_posts( $post_data = null ) {
        }
 
        $updated = $skipped = $locked = array();
+       $shared_post_data = $post_data;
+
        foreach ( $post_IDs as $post_ID ) {
+               // Start with fresh post data with each iteration.
+               $post_data = $shared_post_data;
+
                $post_type_object = get_post_type_object( get_post_type( $post_ID ) );
 
                if ( !isset( $post_type_object ) || ( isset($children) && in_array($post_ID, $children) ) || !current_user_can( 'edit_post', $post_ID ) ) {
@@ -460,13 +465,13 @@ function bulk_edit_posts( $post_data = null ) {
                $post_data['ID'] = $post_ID;
                $post_data['post_ID'] = $post_ID;
 
-               $translated_post_data = _wp_translate_postdata( true, $post_data );
-               if ( is_wp_error( $translated_post_data ) ) {
+               $post_data = _wp_translate_postdata( true, $post_data );
+               if ( is_wp_error( $post_data ) ) {
                        $skipped[] = $post_ID;
                        continue;
                }
 
-               $updated[] = wp_update_post( $translated_post_data );
+               $updated[] = wp_update_post( $post_data );
 
                if ( isset( $post_data['sticky'] ) && current_user_can( $ptype->cap->edit_others_posts ) ) {
                        if ( 'sticky' == $post_data['sticky'] )
index 1622cab93425697a5a80305ee56dca63c7c824cf..ac8e522f26be9fc77070baaa04678d88cbde5986 100644 (file)
@@ -411,6 +411,9 @@ function upgrade_all() {
        if ( $wp_current_db_version < 26691 )
                upgrade_380();
 
+       if ( $wp_current_db_version < 26692 )
+               upgrade_383();
+
        maybe_disable_link_manager();
 
        maybe_disable_automattic_widgets();
@@ -1251,6 +1254,36 @@ function upgrade_380() {
                deactivate_plugins( array( 'mp6/mp6.php' ), true );
        }
 }
+
+/**
+ * Execute changes made in WordPress 3.8.3.
+ *
+ * @since 3.8.3
+ */
+function upgrade_383() {
+       global $wp_current_db_version, $wpdb;
+       if ( $wp_current_db_version < 26692 ) {
+               // Find all lost Quick Draft auto-drafts and promote them to proper drafts.
+               $posts = $wpdb->get_results( "SELECT ID, post_title, post_content FROM $wpdb->posts WHERE post_type = 'post'
+                       AND post_status = 'auto-draft' AND post_date >= '2014-04-08 00:00:00'" );
+
+               foreach ( $posts as $post ) {
+                       // A regular auto-draft should never have content as that would mean it should have been promoted.
+                       // If an auto-draft has content, it's from Quick Draft and it should be recovered.
+                       if ( '' === $post->post_content ) {
+                               // If it does not have content, we must evaluate whether the title should be recovered.
+                               if ( 'Auto Draft' === $post->post_title || __( 'Auto Draft' ) === $post->post_title ) {
+                                       // This a plain old auto draft. Ignore it.
+                                       continue;
+                               }
+                       }
+
+                       $wpdb->update( $wpdb->posts, array( 'post_status' => 'draft' ), array( 'ID' => $post->ID ) );
+                       clean_post_cache( $post->ID );
+               }
+       }
+}
+
 /**
  * Execute network level changes
  *
index b249632735308f3ea8716e7d105d4c3ccc011b14..15ae453cbef19fb57ba5625cc0c9a73d9519f5a8 100644 (file)
@@ -4,14 +4,14 @@
  *
  * @global string $wp_version
  */
-$wp_version = '3.8.2';
+$wp_version = '3.8.3';
 
 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
  *
  * @global int $wp_db_version
  */
-$wp_db_version = 26691;
+$wp_db_version = 26692;
 
 /**
  * Holds the TinyMCE version