bbp_get_reply_title_fallback( string $post_title = '', int $post_id )
Get empty reply title fallback.
Description Description
Parameters Parameters
- $post_title
-
(Optional) Required. Reply Title
Default value: ''
- $post_id
-
(Required) Required. Reply ID
Return Return
(string) Title of reply
Source Source
File: includes/replies/template.php
function bbp_get_reply_title_fallback( $post_title = '', $post_id = 0 ) {
// Bail if title not empty, or post is not a reply
if ( ! empty( $post_title ) || ! bbp_is_reply( $post_id ) ) {
return $post_title;
}
// Get reply topic title.
$topic_title = bbp_get_reply_topic_title( $post_id );
// Get empty reply title fallback.
$reply_title = sprintf( esc_html__( 'Reply To: %s', 'bbpress' ), $topic_title );
// Filter & return
return apply_filters( 'bbp_get_reply_title_fallback', $reply_title, $post_id, $topic_title );
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |