<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>
</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' ); ?>
_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' :
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'] );
}
$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 ) ) {
$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'] )
if ( $wp_current_db_version < 26691 )
upgrade_380();
+ if ( $wp_current_db_version < 26692 )
+ upgrade_383();
+
maybe_disable_link_manager();
maybe_disable_automattic_widgets();
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
*
*
* @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