Changes in trunk/wp-admin/includes/comment.php [17232:13420]
- File:
-
- 1 edited
-
trunk/wp-admin/includes/comment.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/comment.php
r17232 r13420 10 10 * {@internal Missing Short Description}} 11 11 * 12 * @since 2.0.012 * @since unknown 13 13 * @uses $wpdb 14 14 * 15 * @param string $comment_author Author of the comment16 * @param string $comment_date Date of the comment15 * @param string $comment_author 16 * @param string $comment_date 17 17 * @return mixed Comment ID on success. 18 18 */ … … 28 28 29 29 /** 30 * Update a comment with values provided in $_POST.30 * {@internal Missing Short Description}} 31 31 * 32 * @since 2.0.032 * @since unknown 33 33 */ 34 34 function edit_comment() { 35 35 36 if ( ! current_user_can( 'edit_comment', (int) $_POST['comment_ID'] ) ) 37 wp_die ( __( 'You are not allowed to edit comments on this post.' ) ); 36 $comment_post_ID = (int) $_POST['comment_post_ID']; 37 38 if (!current_user_can( 'edit_post', $comment_post_ID )) 39 wp_die( __('You are not allowed to edit comments on this post, so you cannot edit this comment.' )); 38 40 39 41 $_POST['comment_author'] = $_POST['newcomment_author']; … … 51 53 } 52 54 53 if ( !empty ( $_POST['edit_date'] ) ) {55 if (!empty ( $_POST['edit_date'] ) ) { 54 56 $aa = $_POST['aa']; 55 57 $mm = $_POST['mm']; … … 65 67 } 66 68 67 wp_update_comment( $_POST );69 wp_update_comment( $_POST); 68 70 } 69 71 … … 71 73 * {@internal Missing Short Description}} 72 74 * 73 * @since 2.0.075 * @since unknown 74 76 * 75 * @param int $id ID of comment to retrieve76 * @return bool|object Comment if found. False on failure.77 * @param unknown_type $id 78 * @return unknown 77 79 */ 78 80 function get_comment_to_edit( $id ) { … … 97 99 * Get the number of pending comments on a post or posts 98 100 * 99 * @since 2.3.0101 * @since unknown 100 102 * @uses $wpdb 101 103 * … … 157 159 wp_enqueue_script( 'jquery-table-hotkeys' ); 158 160 } 161 162 if ( is_admin() && isset($pagenow) && ('edit-comments.php' == $pagenow || 'edit.php' == $pagenow) ) { 163 if ( get_option('show_avatars') ) 164 add_filter( 'comment_author', 'floated_admin_avatar' ); 165 } 166 159 167 ?>
Note: See TracChangeset
for help on using the changeset viewer.