Skip to:
Content

BuddyPress.org

Ticket #2598: 2598-2.patch

File 2598-2.patch, 1.2 KB (added by boonebgorges, 14 years ago)
  • bp-themes/bp-default/functions.php

     
    263263}
    264264add_action( 'wp_footer', 'bp_dtheme_js_terms' );
    265265
     266function mmy_page_title( $title, $b ) {
     267global $bp;
     268
     269if ( $bp->current_action == 'forum' && $bp->action_variables[0] == 'topic' ) {
     270$topic_title = bp_get_the_topic_title();
     271$title .= ' | ' . $topic_title;
     272}
     273
     274return $title;
     275}
     276add_filter( 'bp_page_title', 'mmy_page_title', 10, 2 );
     277
    266278?>
     279 No newline at end of file
  • bp-forums/bp-forums-filters.php

     
    8888                return "<a $text rel=\"nofollow\">";
    8989        }
    9090
     91function bp_forums_add_forum_topic_to_page_title( $title ) {
     92        global $bp;
     93
     94        if ( $bp->current_action == 'forum' && $bp->action_variables[0] == 'topic' ) {
     95                if ( bp_has_forum_topic_posts() )
     96                        $title .= ' &#124; ' . bp_get_the_topic_title();
     97        }
     98        return $title;
     99}
     100add_filter( 'bp_page_title', 'bp_forums_add_forum_topic_to_page_title' );
     101
     102
    91103?>
     104 No newline at end of file