Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r19528 r21048  
    2323wp_enqueue_script('set-post-thumbnail' );
    2424wp_enqueue_style('imgareaselect');
     25wp_enqueue_script( 'media-gallery' );
    2526
    2627@header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
    … …  
    3233// Require an ID for the edit screen
    3334if ( isset($action) && $action == 'edit' && !$ID )
    34         wp_die(__("You are not allowed to be here"));
     35        wp_die( __( 'Cheatin’ uh?' ) );
    3536
    3637if ( isset($_GET['inline']) ) {
    3738        $errors = array();
     39
     40        if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) )
     41                wp_die( __( 'Cheatin’ uh?' ) );
    3842
    3943        if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
    … …  
    5963        }
    6064
     65        if ( isset( $_REQUEST['post_id'] ) )
     66                wp_die( __( 'Cheatin’ uh?' ) );
     67
    6168        $title = __('Upload New Media');
    6269        $parent_file = 'upload.php';
    … …  
    6875                '<ul>' .
    6976                        '<li>' . __('<strong>Drag and drop</strong> your files into the area below. Multiple files are allowed.') . '</li>' .
    70                         '<li>' . __('<strong>Select Files</strong> will open the multi-file uploader, or you can use the <strong>Browser Uploader</strong>.') . '</li>' .
    7177                        '<li>' . __('Clicking <strong>Select Files</strong> opens a navigation window showing you files in your operating system. Selecting <strong>Open</strong> after clicking on the file you want activates a progress bar on the uploader screen.') . '</li>' .
     78                        '<li>' . __('Revert to the <strong>Browser Uploader</strong> by clicking the link below the drag and drop box.') . '</li>' .
    7279                '</ul>' .
    7380                '<p>' . __('Basic image editing is available after upload is complete. Make sure you click Save before leaving this screen.') . '</p>'
    … …  
    116123
    117124} else {
     125        if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) )
     126                wp_die( __( 'Cheatin&#8217; uh?' ) );
    118127
    119128        // upload type: image, video, file, ..?
    … …  
    137146                do_action("media_upload_$tab");
    138147}
    139 ?>
Note: See TracChangeset for help on using the changeset viewer.