Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r18023 r17458  
    139139    $post = get_post( $post_ID );
    140140    $post_data['post_type'] = $post->post_type;
    141     $post_data['post_mime_type'] = $post->post_mime_type;
    142141
    143142    $ptype = get_post_type_object($post_data['post_type']);
     
    201200            if ( $meta->post_id != $post_ID )
    202201                continue;
    203             if ( is_protected_meta( $value['key'] ) )
    204                 continue;
    205202            update_meta( $key, $value['key'], $value['value'] );
    206203        }
     
    212209                continue;
    213210            if ( $meta->post_id != $post_ID )
    214                 continue;
    215             if ( is_protected_meta( $meta->meta_key ) )
    216211                continue;
    217212            delete_meta( $key );
     
    533528    }
    534529
    535     $_POST['post_mime_type'] = '';
    536 
    537530    // Check for autosave collisions
    538531    // Does this need to be updated? ~ Mark
     
    640633    $post_ID = (int) $post_ID;
    641634
     635    $protected = array( '_wp_attached_file', '_wp_attachment_metadata', '_wp_old_slug', '_wp_page_template' );
     636
    642637    $metakeyselect = isset($_POST['metakeyselect']) ? stripslashes( trim( $_POST['metakeyselect'] ) ) : '';
    643638    $metakeyinput = isset($_POST['metakeyinput']) ? stripslashes( trim( $_POST['metakeyinput'] ) ) : '';
     
    656651            $metakey = $metakeyinput; // default
    657652
    658         if ( is_protected_meta( $metakey ) )
     653        if ( in_array($metakey, $protected) )
    659654            return false;
    660655
     
    762757    global $wpdb;
    763758
     759    $protected = array( '_wp_attached_file', '_wp_attachment_metadata', '_wp_old_slug', '_wp_page_template' );
     760
    764761    $meta_key = stripslashes($meta_key);
    765762
    766     if ( is_protected_meta( $meta_key ) )
     763    if ( in_array($meta_key, $protected) )
    767764        return false;
    768765
     
    997994    $q['cat'] = isset( $q['cat'] ) ? (int) $q['cat'] : 0;
    998995    $q['post_type'] = 'attachment';
    999     $post_type = get_post_type_object( 'attachment' );
    1000     $states = array( 'inherit' );
    1001     if ( current_user_can( $post_type->cap->read_private_posts ) )
    1002         $states[] = 'private';
    1003 
    1004     $q['post_status'] = isset( $q['status'] ) && 'trash' == $q['status'] ? 'trash' : $states;
     996    $q['post_status'] = isset( $q['status'] ) && 'trash' == $q['status'] ? 'trash' : 'inherit';
    1005997    $media_per_page = (int) get_user_option( 'upload_per_page' );
    1006998    if ( empty( $media_per_page ) || $media_per_page < 1 )
Note: See TracChangeset for help on using the changeset viewer.