WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/async-upload.php

    r17393 r14816  
    3131// just fetch the detail form for that attachment
    3232if ( isset($_REQUEST['attachment_id']) && ($id = intval($_REQUEST['attachment_id'])) && $_REQUEST['fetch'] ) {
    33     $post = get_post( $id );
    34     if ( 'attachment' != $post->post_type )
    35         wp_die( __( 'Unknown post type.' ) );
    36     $post_type_object = get_post_type_object( 'attachment' );
    37     if ( ! current_user_can( $post_type_object->cap->edit_post, $id ) )
    38         wp_die( __( 'You are not allowed to edit this item.' ) );
    39 
    4033    if ( 2 == $_REQUEST['fetch'] ) {
    4134        add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);
Note: See TracChangeset for help on using the changeset viewer.