if ( $wp_rewrite->using_permalinks() ) {
$url = $wp_rewrite->root . $bbp->topic_slug . '/' . $topic->post_name . '/edit';
$url = home_url( user_trailingslashit( $url ) );
// Unpretty permalinks
} else {
$url = add_query_arg( array( bbp_get_topic_post_type() => $topic->post_name, 'edit' => '1' ), home_url( '/' ) );
}
return apply_filters( 'bbp_get_topic_edit_url', $url, $topic_id );
}
/**
* Output the trash link of the topic
*
* @since bbPress (r2727)
*
* @param mixed $args See {@link bbp_get_topic_trash_link()}
* @uses bbp_get_topic_trash_link() To get the topic trash link
*/