Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/19/2011 05:29:51 PM (15 years ago)
Author:
djpaul
Message:

Rework page <title> generation to use WP's wp_title(). Fixes #2598

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-forums/bp-forums-filters.php

    r4301 r4536  
    9595 *
    9696 * @global object $bp
    97  * @param string $title
     97 * @param string $title New page title; see bp_modify_page_title()
     98 * @param string $title Original page title
     99 * @param string $sep How to separate the various items within the page title.
     100 * @param string $seplocation Direction to display title
    98101 * @return string
    99  */
    100 function bp_forums_add_forum_topic_to_page_title( $title ) {
     102 * @see bp_modify_page_title()
     103 */
     104function bp_forums_add_forum_topic_to_page_title( $title, $original_title, $sep, $seplocation  ) {
    101105    global $bp;
    102106
    103107    if ( $bp->current_action == 'forum' && !empty( $bp->action_variables[0] ) && 'topic' == $bp->action_variables[0] )
    104108        if ( bp_has_forum_topic_posts() )
    105             $title .= ' &#124; ' . bp_get_the_topic_title();
     109            $title .= bp_get_the_topic_title() . " $sep ";
    106110
    107111    return $title;
    108112}
    109 add_filter( 'bp_page_title', 'bp_forums_add_forum_topic_to_page_title' );
     113add_filter( 'bp_modify_page_title', 'bp_forums_add_forum_topic_to_page_title', 9, 4 );
    110114
    111115/**
Note: See TracChangeset for help on using the changeset viewer.