WordPress.org

Make WordPress Core

Ticket #18548: 18548-_doing_it_wrong.patch

File 18548-_doing_it_wrong.patch, 835 bytes (added by ocean90, 5 years ago)
  • src/wp-includes/theme.php

     
    16151615                case 'title-tag' :
    16161616                        // Can be called in functions.php but must happen before wp_loaded, i.e. not in header.php.
    16171617                        if ( did_action( 'wp_loaded' ) ) {
    1618                                 _doing_it_wrong( "add_theme_support( 'title-tag' )", sprintf( _x( 'You need to add theme support before %s.', 'action name' ), '<code>wp_loaded</code>' ), '4.1.0' );
     1618                                /* translators: 1: Theme support 2: hook name */
     1619                                _doing_it_wrong( "add_theme_support( 'title-tag' )", sprintf( __( 'Theme support for %1$s should be registered before the %2$s hook.' ),
     1620                                        '<code>title-tag</code>', '<code>wp_loaded</code>' ), '4.1' );
    16191621
    16201622                                return false;
    16211623                        }