bbp_get_reply_edit_url( int $reply_id )
Return URL to the reply edit page
Description
Parameters
- $reply_id
-
(Optional) Reply id
Return
(string) Reply edit url
Source
File: bp-forums/replies/template.php
function bbp_get_reply_edit_url( $reply_id = 0 ) { global $wp_rewrite; $bbp = bbpress(); $reply = bbp_get_reply( bbp_get_reply_id( $reply_id ) ); if ( empty( $reply ) ) return; $reply_link = bbp_remove_view_all( bbp_get_reply_permalink( $reply_id ) ); // Pretty permalinks if ( $wp_rewrite->using_permalinks() ) { $url = trailingslashit( $reply_link ) . $bbp->edit_id; $url = trailingslashit( $url ); // Unpretty permalinks } else { $url = add_query_arg( array( bbp_get_reply_post_type() => $reply->post_name, $bbp->edit_id => '1' ), $reply_link ); } // Maybe add view all $url = bbp_add_view_all( $url ); return apply_filters( 'bbp_get_reply_edit_url', $url, $reply_id ); }
Changelog
Version | Description |
---|---|
bbPress (r2753) | 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.