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
2508       *
2509       * @since 4.7.0
2510       * @since 5.5.0 Returning a WP_Error value from the filter will short-circuit comment update
2511       *              and allow skipping further processing.
2512       *
2513       * @param array|WP_Error $data       The new, processed comment data, or WP_Error.
2514       * @param array          $comment    The old, unslashed comment data.
2515       * @param array          $commentarr The new, raw comment data.
2516       */
2517      $data = apply_filters( 'wp_update_comment_data', $data, $comment, $commentarr );
2518
2519      // Do not carry on on failure.
2520      if ( is_wp_error( $data ) ) {
2521           if ( $wp_error ) {
2522                return $data;
2523           } else {
2524                return false;
2525           }
2526      }