~canonical-sysadmins/wordpress/4.7.2

« back to all changes in this revision

Viewing changes to wp-admin/media-upload.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
require_once( dirname( __FILE__ ) . '/admin.php' );
17
17
 
18
18
if ( ! current_user_can( 'upload_files' ) ) {
19
 
        wp_die( __( 'You do not have permission to upload files.' ), 403 );
 
19
        wp_die( __( 'Sorry, you are not allowed to upload files.' ), 403 );
20
20
}
21
21
 
22
22
wp_enqueue_script('plupload-handlers');
43
43
if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) ) {
44
44
        wp_die(
45
45
                '<h1>' . __( 'Cheatin&#8217; uh?' ) . '</h1>' .
46
 
                '<p>' . __( 'You are not allowed to edit this item.' ) . '</p>',
 
46
                '<p>' . __( 'Sorry, you are not allowed to edit this item.' ) . '</p>',
47
47
                403
48
48
        );
49
49
}
53
53
        $type = strval($_GET['type']);
54
54
} else {
55
55
        /**
56
 
         * Filter the default media upload type in the legacy (pre-3.5.0) media popup.
 
56
         * Filters the default media upload type in the legacy (pre-3.5.0) media popup.
57
57
         *
58
58
         * @since 2.5.0
59
59
         *
68
68
        $tab = strval($_GET['tab']);
69
69
} else {
70
70
        /**
71
 
         * Filter the default tab in the legacy (pre-3.5.0) media popup.
 
71
         * Filters the default tab in the legacy (pre-3.5.0) media popup.
72
72
         *
73
73
         * @since 2.5.0
74
74
         *