bbp_get_forum_archive_title( string $title = '' )
Return the forum archive title
Description Description
Parameters Parameters
- $title
-
(Optional) Default text to use as title
Default value: ''
Return Return
(string) The forum archive title
Source Source
File: includes/forums/template.php
function bbp_get_forum_archive_title( $title = '' ) { // If no title was passed if ( empty( $title ) ) { // Set root text to page title $page = bbp_get_page_by_path( bbp_get_root_slug() ); if ( ! empty( $page ) ) { $title = get_the_title( $page->ID ); // Default to forum post type name label } else { $fto = get_post_type_object( bbp_get_forum_post_type() ); $title = $fto->labels->name; } } // Filter & return return apply_filters( 'bbp_get_forum_archive_title', $title ); }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |