Changeset 3985 for trunk/wp-admin/admin-functions.php
- Timestamp:
- 07/05/2006 10:00:03 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/admin-functions.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r3981 r3985 7 7 if ( 'page' == $_POST['post_type'] ) { 8 8 if ( !current_user_can('edit_pages') ) 9 die(__('You are not allowed to create pages on this blog.'));9 wp_die(__('You are not allowed to create pages on this blog.')); 10 10 } else { 11 11 if ( !current_user_can('edit_posts') ) 12 die(__('You are not allowed to create posts or drafts on this blog.'));12 wp_die(__('You are not allowed to create posts or drafts on this blog.')); 13 13 } 14 14 … … 33 33 if ( 'page' == $_POST['post_type'] ) { 34 34 if ( !current_user_can('edit_others_pages') ) 35 die(__('You cannot create pages as this user.'));35 wp_die(__('You cannot create pages as this user.')); 36 36 } else { 37 37 if ( !current_user_can('edit_others_posts') ) 38 die(__('You cannot post as this user.'));38 wp_die(__('You cannot post as this user.')); 39 39 40 40 } … … 152 152 if ( 'page' == $_POST['post_type'] ) { 153 153 if ( !current_user_can('edit_page', $post_ID) ) 154 die(__('You are not allowed to edit this page.'));154 wp_die(__('You are not allowed to edit this page.')); 155 155 } else { 156 156 if ( !current_user_can('edit_post', $post_ID) ) 157 die(__('You are not allowed to edit this post.'));157 wp_die(__('You are not allowed to edit this post.')); 158 158 } 159 159 … … 177 177 if ( 'page' == $_POST['post_type'] ) { 178 178 if ( !current_user_can('edit_others_pages') ) 179 die(__('You cannot edit pages as this user.'));179 wp_die(__('You cannot edit pages as this user.')); 180 180 } else { 181 181 if ( !current_user_can('edit_others_posts') ) 182 die(__('You cannot edit posts as this user.'));182 wp_die(__('You cannot edit posts as this user.')); 183 183 184 184 } … … 252 252 253 253 if (!current_user_can('edit_post', $comment_post_ID)) 254 die(__('You are not allowed to edit comments on this post, so you cannot edit this comment.'));254 wp_die(__('You are not allowed to edit comments on this post, so you cannot edit this comment.')); 255 255 256 256 $_POST['comment_author'] = $_POST['newcomment_author']; … … 531 531 function edit_link($link_id = '') { 532 532 if (!current_user_can('manage_links')) 533 die(__("Cheatin' uh ?"));533 wp_die(__("Cheatin' uh ?")); 534 534 535 535 $_POST['link_url'] = wp_specialchars($_POST['link_url']); … … 1522 1522 switch ($code) { 1523 1523 case 1 : 1524 die(__('Sorry, can’t edit files with ".." in the name. If you are trying to edit a file in your WordPress home directory, you can just type the name of the file in.'));1524 wp_die(__('Sorry, can’t edit files with ".." in the name. If you are trying to edit a file in your WordPress home directory, you can just type the name of the file in.')); 1525 1525 1526 1526 case 2 : 1527 die(__('Sorry, can’t call files with their real path.'));1527 wp_die(__('Sorry, can’t call files with their real path.')); 1528 1528 1529 1529 case 3 : 1530 die(__('Sorry, that file cannot be edited.'));1530 wp_die(__('Sorry, that file cannot be edited.')); 1531 1531 } 1532 1532 } … … 1845 1845 $new_file = $uploads['path'] . "/$filename"; 1846 1846 if ( false === @ move_uploaded_file($file['tmp_name'], $new_file) ) 1847 die(printf(__('The uploaded file could not be moved to %s.'), $file['path']));1847 wp_die(printf(__('The uploaded file could not be moved to %s.'), $file['path'])); 1848 1848 1849 1849 // Set correct file permissions
Note:
See TracChangeset
for help on using the changeset viewer.