Changeset 48230
- Timestamp:
- 06/30/2020 12:01:05 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r48227 r48230 2491 2491 * Filters the comment data immediately before it is updated in the database. 2492 2492 * 2493 * Note: data being passed to the filter is already unslashed. Returning false 2494 * or a WP_Error object would prevent the comment from being updated. 2493 * Note: data being passed to the filter is already unslashed. 2495 2494 * 2496 2495 * @since 4.7.0 2497 * @since 5.5.0 The `$wp_error` parameter was added. 2498 * 2499 * @param array $data The new, processed comment data. 2500 * @param array $comment The old, unslashed comment data. 2501 * @param array $commentarr The new, raw comment data. 2502 * @param bool $wp_error Whether to return a WP_Error on failure. 2503 */ 2504 $data = apply_filters( 'wp_update_comment_data', $data, $comment, $commentarr, $wp_error ); 2505 2506 if ( ! $data ) { 2507 $data = new WP_Error( 'comment_update_canceled', __( 'Comment update canceled.' ) ); 2508 } 2496 * @since 5.5.0 Returning a WP_Error value from the filter will short-circuit comment update 2497 * and allow skipping further processing. 2498 * 2499 * @param array|WP_Error $data The new, processed comment data, or WP_Error. 2500 * @param array $comment The old, unslashed comment data. 2501 * @param array $commentarr The new, raw comment data. 2502 */ 2503 $data = apply_filters( 'wp_update_comment_data', $data, $comment, $commentarr ); 2509 2504 2510 2505 // Do not carry on on failure.
Note: See TracChangeset
for help on using the changeset viewer.