WordPress.org

Make WordPress Core

Ticket #31078: 31078.11.patch

File 31078.11.patch, 715 bytes (added by Fab1en, 4 years ago)

Display deprecation notice outsite <title> tag

  • src/wp-includes/deprecated.php

    diff --git a/src/wp-includes/deprecated.php b/src/wp-includes/deprecated.php
    index 91d5670..83441f5 100644
    a b function force_ssl_login( $force = null ) { 
    36623662 * @return string|null String on retrieve, null when displaying.
    36633663 */
    36643664function wp_title( $sep = '&raquo;', $display = true, $seplocation = '' ) {
    3665         _deprecated_function( __FUNCTION__, '4.4', 'add_theme_support( \'title-tag\' )' );
     3665        add_action( 'wp_head', function(){
     3666                echo '<meta name="deprecated_notice" content="';
     3667                _deprecated_function( 'wp_title', '4.4', 'add_theme_support( \'title-tag\' )' );
     3668                echo '" />';
     3669        }, 1);
    36663670
    36673671        global $wp_locale;
    36683672