Changeset 33852
- Timestamp:
- 09/02/2015 04:05:07 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-tags.php
r33641 r33852 18 18 wp_die( __( 'Invalid taxonomy' ) ); 19 19 20 if ( ! current_user_can( $tax->cap->manage_terms ) ) 21 wp_die( __( 'Cheatin’ uh?' ), 403 ); 20 if ( ! current_user_can( $tax->cap->manage_terms ) ) { 21 wp_die( 22 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 23 '<p>' . __( 'You are not allowed to manage these items.' ) . '</p>', 24 403 25 ); 26 } 22 27 23 28 /** … … 54 59 check_admin_referer( 'add-tag', '_wpnonce_add-tag' ); 55 60 56 if ( !current_user_can( $tax->cap->edit_terms ) ) 57 wp_die( __( 'Cheatin’ uh?' ), 403 ); 61 if ( ! current_user_can( $tax->cap->edit_terms ) ) { 62 wp_die( 63 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 64 '<p>' . __( 'You are not allowed to add this item.' ) . '</p>', 65 403 66 ); 67 } 58 68 59 69 $ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST ); … … 90 100 check_admin_referer( 'delete-tag_' . $tag_ID ); 91 101 92 if ( !current_user_can( $tax->cap->delete_terms ) ) 93 wp_die( __( 'Cheatin’ uh?' ), 403 ); 102 if ( ! current_user_can( $tax->cap->delete_terms ) ) { 103 wp_die( 104 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 105 '<p>' . __( 'You are not allowed to delete this item.' ) . '</p>', 106 403 107 ); 108 } 94 109 95 110 wp_delete_term( $tag_ID, $taxonomy ); … … 102 117 check_admin_referer( 'bulk-tags' ); 103 118 104 if ( !current_user_can( $tax->cap->delete_terms ) ) 105 wp_die( __( 'Cheatin’ uh?' ), 403 ); 119 if ( ! current_user_can( $tax->cap->delete_terms ) ) { 120 wp_die( 121 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 122 '<p>' . __( 'You are not allowed to delete these items.' ) . '</p>', 123 403 124 ); 125 } 106 126 107 127 $tags = (array) $_REQUEST['delete_tags']; … … 140 160 check_admin_referer( 'update-tag_' . $tag_ID ); 141 161 142 if ( !current_user_can( $tax->cap->edit_terms ) ) 143 wp_die( __( 'Cheatin’ uh?' ), 403 ); 162 if ( ! current_user_can( $tax->cap->edit_terms ) ) { 163 wp_die( 164 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 165 '<p>' . __( 'You are not allowed to edit this item.' ) . '</p>', 166 403 167 ); 168 } 144 169 145 170 $tag = get_term( $tag_ID, $taxonomy ); … … 253 278 require_once( ABSPATH . 'wp-admin/admin-header.php' ); 254 279 255 if ( !current_user_can($tax->cap->edit_terms) ) 256 wp_die( __('You are not allowed to edit this item.') ); 280 if ( ! current_user_can( $tax->cap->edit_terms ) ) { 281 wp_die( 282 '<h1>' . __( 'Cheatin’ uh?' ) . '</h1>' . 283 '<p>' . __( 'You are not allowed to edit this item.' ) . '</p>', 284 403 285 ); 286 } 257 287 258 288 $messages = array();
Note: See TracChangeset
for help on using the changeset viewer.