WordPress 4.4 Deprecate the wp_title Function – Recapped

WordPress 4.4 will deprecate wp_title() with the change, plugin authors will be able to check for theme support and use a few new filters to manipulate the title. The new filter are follows:

  • ‘pre_get_document_title’ short-circuits wp_get_document_title() if it returns anything other than an empty value.
  • ‘document_title_separator’ filters the separator between title parts.
  • ‘document_title_parts’ filyers the parts that makeup the document title, passed in an associative array.

Theme authors should no longer use wp_title() to generate document titles. If the theme authors add add_them_support( ‘title-tag’ ); to the after_setup_theme callback, the title will be handled natively via an internal WordPress core function. If you use a theme that utilizes wp_title and have wp_debug enabled in WordPress 4.4, you’ll see a deprecation notice. Generally, users who upgrade to WordPress 4.4 won’t notice a difference.

If you want further details about this topic, visit at WordPress 4.4 to Deprecate the wp_title Function.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.