Browse Source

revert wp_title until 4.4.

windhamdavid 9 years ago
parent
commit
b1366453da
1 changed files with 14 additions and 12 deletions
  1. 14 12
      inc/template.php

+ 14 - 12
inc/template.php

@@ -27,18 +27,20 @@ function page_bodyclass() {
 endif;
 
 // ********* DEPRECATED wp_title in 4.4 ***********
-//if ( ! function_exists( 'dw_page_title') ) :
-//function dw_page_title() {
-//	global $page, $paged; 
-//	wp_title( '|', true, 'right' ); 
-//	bloginfo( 'name' ); $site_description = get_bloginfo( 'description', 'display' );
-//	if ( $site_description && ( is_home() || is_front_page() ) )
-//		echo " | $site_description";
-//	if ( $paged >= 2 || $page >= 2 )
-//		echo ' | ' . sprintf( __( 'Page %s', 'dw' ), max( $paged, $page ) );
-//}
-//endif;
+if ( ! function_exists( 'dw_page_title') ) :
+function dw_page_title() {
+	global $page, $paged; 
+	wp_title( '|', true, 'right' ); 
+	bloginfo( 'name' ); $site_description = get_bloginfo( 'description', 'display' );
+	if ( $site_description && ( is_home() || is_front_page() ) )
+		echo " | $site_description";
+	if ( $paged >= 2 || $page >= 2 )
+		echo ' | ' . sprintf( __( 'Page %s', 'dw' ), max( $paged, $page ) );
+}
+add_filter( 'document_title_separator', function () { return '|'; } );
+endif;
 
+/*========= Wait until WP 4.4 ============
 function filter_wp_title( $title, $sep ) {
     global $paged, $page;
  
@@ -58,7 +60,7 @@ function filter_wp_title( $title, $sep ) {
 }
 add_filter( 'wp_title', 'filter_wp_title', 10, 2 );
 add_filter( 'document_title_separator', function () { return '|'; } );
-
+*/
 
 if ( ! function_exists( 'dw_meta_desc') ) :
 function dw_meta_desc() {