| 130 | * Customize document title. |
| 131 | * |
| 132 | * @param array $parts The document title parts. |
| 133 | * @return array The document title parts. |
| 134 | */ |
| 135 | function wporg_remove_forum_name_from_title( $parts ) { |
| 136 | // Omit page name from the home page. |
| 137 | if ( is_front_page() ) { |
| 138 | $parts['title'] = ''; |
| 139 | } |
| 140 | |
| 141 | // Run the title through bbPress's title customizer. |
| 142 | // TODO: Remove this once bbPress deprecates hooking wp_title and hooks |
| 143 | // 'document_title_parts' instead. |
| 144 | $parts['title'] = bbp_title( $parts['title'], '', 'right' ); |
| 145 | |
| 146 | return $parts; |
| 147 | } |
| 148 | add_filter( 'document_title_parts', 'wporg_remove_forum_name_from_title' ); |
| 149 | |
| 150 | // Change the document title separator. |
| 151 | add_filter( 'document_title_separator', create_function( '$separator', 'return "«";' ) ); |
| 152 | |
| 153 | /** |