bbp_get_topic_archive_title( string $title = '' )
Return the topic archive title
Description Description
Parameters Parameters
- $title
-
(Optional) Default text to use as title
Default value: ''
Return Return
(string) The topic archive title
Source Source
File: includes/topics/template.php
function bbp_get_topic_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_topic_archive_slug() ); if ( ! empty( $page ) ) { $title = get_the_title( $page->ID ); // Default to topic post type name label } else { $tto = get_post_type_object( bbp_get_topic_post_type() ); $title = $tto->labels->name; } } // Filter & return return apply_filters( 'bbp_get_topic_archive_title', $title ); }
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |