bbp_update_reply_to( int $reply_id, int $reply_to )
Update the reply’s meta data with its reply to id
Description
Parameters
- $reply_id
-
(Required) Reply id to update
- $reply_to
-
(Optional) Reply to id
Return
(bool) Reply's parent reply id
Source
File: bp-forums/replies/functions.php
function bbp_update_reply_to( $reply_id = 0, $reply_to = 0 ) { // Validation $reply_id = bbp_get_reply_id( $reply_id ); $reply_to = bbp_validate_reply_to( $reply_to ); // Update or delete the `reply_to` postmeta if ( ! empty( $reply_id ) ) { // Update the reply to if ( !empty( $reply_to ) ) { update_post_meta( $reply_id, '_bbp_reply_to', $reply_to ); // Delete the reply to } else { delete_post_meta( $reply_id, '_bbp_reply_to' ); } } return (int) apply_filters( 'bbp_update_reply_to', (int) $reply_to, $reply_id ); }
Changelog
Version | Description |
---|---|
bbPress (r4944) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.