Created
June 28, 2016 22:10
-
-
Save anonymous/6db5af892a4cf4fb029655167d7002a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'init', 'change_title' ); | |
function change_title() { | |
add_theme_support( 'title-tag' ); | |
add_filter('pre_get_document_title', 'dq_pre_get_document_title', 10); | |
function dq_pre_get_document_title(){ | |
error_log('pre_get_document_title'); | |
return 'Title: pre_get_document_title'; | |
} | |
add_filter( 'document_title_parts', function( $title ) | |
{ | |
error_log('document_title_parts'); | |
return 'Title: document_title_parts'; | |
}, 10, 1 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment