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