BBP_Forums_Group_Extension::new_topic_redirect_to( str $redirect_url = '', str $redirect_to = '', $topic_id )
Redirect to the group forum screen
Description
Parameters
- $redirect_url
-
(str) (Optional)
Default value: ''
- $redirect_to
-
(str) (Optional)
Default value: ''
Source
File: bp-forums/groups.php
public function new_topic_redirect_to( $redirect_url = '', $redirect_to = '', $topic_id = 0 ) { if ( bp_is_group() ) { $topic = bbp_get_topic( $topic_id ); $topic_hash = '#post-' . $topic_id; $redirect_url = trailingslashit( bp_get_group_permalink( groups_get_current_group() ) ) . trailingslashit( $this->slug ) . trailingslashit( $this->topic_slug ) . trailingslashit( $topic->post_name ) . $topic_hash; } return $redirect_url; }
Changelog
Version | Description |
---|---|
bbPress (r3653) | 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.