WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
2554 | * |
2555 | * @since 4.7.0 |
2556 | * @since 5.5.0 Returning a WP_Error value from the filter will short-circuit comment update |
2557 | * and allow skipping further processing. |
2558 | * |
2559 | * @param array|WP_Error $data The new, processed comment data, or WP_Error. |
2560 | * @param array $comment The old, unslashed comment data. |
2561 | * @param array $commentarr The new, raw comment data. |
2562 | */ |
2563 | $data = apply_filters( 'wp_update_comment_data', $data, $comment, $commentarr ); |
2564 |
|
2565 | // Do not carry on on failure. |
2566 | if ( is_wp_error( $data ) ) { |
2567 | if ( $wp_error ) { |
2568 | return $data; |
2569 | } else { |
2570 | return false; |
2571 | } |
2572 | } |