Skip to:
Content

BuddyPress.org

Changeset 3221


Ignore:
Timestamp:
08/28/2010 11:59:16 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Fixes #2598 props boonebgorges

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-forums/bp-forums-filters.php

    r3143 r3221  
    8989    }
    9090
     91/**
     92 * bp_forums_add_forum_topic_to_page_title( $title )
     93 *
     94 * Append forum topic to page title
     95 *
     96 * @global object $bp
     97 * @param string $title
     98 * @return string
     99 */
     100function bp_forums_add_forum_topic_to_page_title( $title ) {
     101    global $bp;
     102
     103    if ( $bp->current_action == 'forum' && $bp->action_variables[0] == 'topic' ) {
     104        if ( bp_has_forum_topic_posts() ) {
     105            $title .= ' | ' . bp_get_the_topic_title();
     106        }
     107    }
     108
     109    return $title;
     110}
     111add_filter( 'bp_page_title', 'bp_forums_add_forum_topic_to_page_title' );
     112
    91113?>
Note: See TracChangeset for help on using the changeset viewer.