Make WordPress Core


Ignore:
Timestamp:
05/30/2013 09:33:46 PM (11 years ago)
Author:
markjaquith
Message:

First pass at removing Post Format UI.

see #24452. fixes #24455.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r24304 r24388  
    12911291        $new_autosave['post_author'] = $post_author;
    12921292
    1293         // Auto-save revisioned meta fields.
    1294         foreach ( _wp_post_revision_meta_keys() as $meta_key ) {
    1295             if ( isset( $_POST[ $meta_key ] ) && get_post_meta( $new_autosave['ID'], $meta_key, true ) != $_POST[ $meta_key ] ) {
    1296                 // Use the underlying delete_metadata and add_metadata vs delete_post_meta
    1297                 // and add_post_meta to make sure we're working with the actual revision meta.
    1298                 delete_metadata( 'post', $new_autosave['ID'], $meta_key );
    1299 
    1300                 if ( ! empty( $_POST[ $meta_key ] ) )
    1301                     add_metadata( 'post', $new_autosave['ID'], $meta_key, $_POST[ $meta_key ] );
    1302             }
    1303         }
    1304 
    1305         // Save the post format if different
    1306         if ( isset( $_POST['post_format'] ) && get_post_meta( $new_autosave['ID'], '_revision_post_format', true ) != $_POST['post_format'] ) {
    1307             delete_metadata( 'post', $new_autosave['ID'], '_revision_post_format' );
    1308 
    1309             if ( ! empty( $_POST['post_format'] ) )
    1310                 add_metadata( 'post', $new_autosave['ID'], '_revision_post_format', $_POST['post_format'] );
    1311         }
    1312 
    13131293        return wp_update_post( $new_autosave );
    13141294    }
Note: See TracChangeset for help on using the changeset viewer.