Ticket #2598: 2598.diff
File 2598.diff, 1.3 KB (added by , 15 years ago) |
---|
-
bp-forums.php
149 149 150 150 /* Topic Functions */ 151 151 152 function bp_forums_topic_name_global() { 153 global $bp; 154 155 if ( !isset( $bp->action_variables[0] ) || !isset( $bp->action_variables[1] ) || !isset( $bp->action_variables[2] ) ) 156 return; 157 158 if ( $bp->action_variables[1] != 'topic' ) 159 return; 160 161 $topic_id = bp_forums_get_topic_id_from_slug( $bp->action_variables[2] ); 162 163 $topic = get_topic( $topic_id ); 164 165 $bp->current_topic->id = $topic_id; 166 $bp->current_topic->topic_name = $topic->topic_title; 167 } 168 add_action( 'bp_setup_globals', 'bp_forums_topic_name_global' ); 169 152 170 function bp_forums_get_forum_topics( $args = '' ) { 153 171 global $bp; 154 172 -
bp-forums/bp-forums-filters.php
88 88 return "<a $text rel=\"nofollow\">"; 89 89 } 90 90 91 function bp_forums_page_title( $title ) { 92 global $bp; 93 94 if ( isset( $bp->current_topic->topic_name ) ) 95 $title .= ' | ' . $bp->current_topic->topic_name; 96 97 return $title; 98 } 99 add_filter( 'bp_page_title', 'bp_forums_page_title' ); 100 91 101 ?> 102 No newline at end of file