Changeset 33853
- Timestamp:
- 09/02/2015 04:20:46 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/media-upload.php
r31328 r33853 16 16 require_once( dirname( __FILE__ ) . '/admin.php' ); 17 17 18 if (!current_user_can('upload_files')) 19 wp_die(__('You do not have permission to upload files.')); 18 if ( ! current_user_can( 'upload_files' ) ) { 19 wp_die( __( 'You do not have permission to upload files.' ), 403 ); 20 } 20 21 21 22 wp_enqueue_script('plupload-handlers'); … … 32 33 33 34 // Require an ID for the edit screen. 34 if ( isset($action) && $action == 'edit' && !$ID ) { 35 wp_die( __( 'Cheatin’ uh?' ), 403 ); 35 if ( isset( $action ) && $action == 'edit' && !$ID ) { 36 wp_die( 37 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 38 '<p>' . __( 'Invalid item ID.' ) . '</p>', 39 403 40 ); 36 41 } 37 42 38 43 if ( ! empty( $_REQUEST['post_id'] ) && ! current_user_can( 'edit_post' , $_REQUEST['post_id'] ) ) { 39 wp_die( __( 'Cheatin’ uh?' ), 403 ); 44 wp_die( 45 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 46 '<p>' . __( 'You are not allowed to edit this item.' ) . '</p>', 47 403 48 ); 40 49 } 41 50
Note: See TracChangeset
for help on using the changeset viewer.