Skip to content
Snippets Groups Projects
Commit ace6bfe6 authored by Erick Hitter's avatar Erick Hitter
Browse files

Page title, for WP 4.1+

parent 46a6ddc2
No related branches found
No related tags found
1 merge request!2Support for additional HeadSpace2 features
......@@ -72,10 +72,26 @@ class ETH_Escape_HeadSpace2 {
* @return null
*/
private function __construct() {
add_filter( 'pre_get_document_title', array( $this, 'filter_pre_get_document_title' ) );
add_action( 'wp_head', array( $this, 'action_wp_head' ) );
add_action( 'wp_footer', array( $this, 'action_wp_footer' ) );
}
/**
*
*/
public function filter_pre_get_document_title( $title ) {
$_title = get_post_meta( get_the_ID(), '_headspace_page_title', true );
if ( ! empty( $_title ) ) {
$title = esc_html( $_title );
}
unset( $_title );
return $title;
}
/**
*
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment