Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_update_comment_data

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
2194       *
2195       * Note: data being passed to the filter is already unslashed.
2196       *
2197       * @since 4.7.0
2198       *
2199       * @param array $data       The new, processed comment data.
2200       * @param array $comment    The old, unslashed comment data.
2201       * @param array $commentarr The new, raw comment data.
2202       */
2203      $data = apply_filters( 'wp_update_comment_data', $data, $comment, $commentarr );
2204
2205      $rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) );
2206
2207      clean_comment_cache( $comment_ID );
2208      wp_update_comment_count( $comment_post_ID );
2209      /**
2210       * Fires immediately after a comment is updated in the database.
2211       *
2212       * The hook also fires immediately before comment status transition hooks are fired.