Ticket #18548: 18548.4.diff
File 18548.4.diff, 2.7 KB (added by , 10 years ago) |
---|
-
src/wp-includes/default-filters.php
196 196 add_filter( 'http_request_host_is_external', 'allowed_http_request_hosts', 10, 2 ); 197 197 198 198 // Actions 199 add_action( 'wp_head', '_wp_render_title_tag', 1 ); 199 200 add_action( 'wp_head', 'wp_enqueue_scripts', 1 ); 200 201 add_action( 'wp_head', 'feed_links', 2 ); 201 202 add_action( 'wp_head', 'feed_links_extra', 3 ); -
src/wp-includes/general-template.php
731 731 } 732 732 733 733 /** 734 * Display <title> tag with contents. 735 * 736 * @since 4.1.0 737 * @access private 738 */ 739 function _wp_render_title_tag() { 740 if ( ! current_theme_supports( 'title-tag' ) ) { 741 return; 742 } 743 744 // This can only work internally on wp_head. 745 if ( ! did_action( 'wp_head' ) && ( ! function_exists( 'doing_action' ) || ! doing_action( 'wp_head' ) ) ) { 746 return; 747 } 748 749 echo "<title>" . wp_title( '|', false, 'right' ) . "</title>\n"; 750 } 751 752 /** 734 753 * Display or retrieve page title for all areas of blog. 735 754 * 736 755 * By default, the page title will display the separator before the page title, -
src/wp-includes/theme.php
1607 1607 define( 'BACKGROUND_IMAGE', $args[0]['default-image'] ); 1608 1608 1609 1609 break; 1610 1611 // Ensure that 'title-tag' is accessible in the admin. 1612 case 'title-tag' : 1613 if ( function_exists( 'doing_action' ) 1614 && ! doing_action( 'after_setup_theme' ) // can be called here 1615 && ! doing_action( 'init' ) // can also be called here 1616 && ( doing_action() || did_action( 'wp_loaded' ) ) // can be called in functions.php but must happen before wp_loaded, i.e. not in header.php 1617 ) { 1618 _doing_it_wrong( "add_theme_support( 'title-tag' )", __( "You need to add support before 'wp_loaded'." ), '4.1.0' ); 1619 } 1620 break; 1610 1621 } 1611 1622 1612 1623 $_wp_theme_features[ $feature ] = $args; … … 1759 1770 if ( !isset( $_wp_theme_features[$feature] ) ) 1760 1771 return false; 1761 1772 1773 if ( 'title-tag' == $feature ) { 1774 // Don't confirm support unless called internally. 1775 $trace = debug_backtrace(); 1776 if ( '_wp_render_title_tag' !== $trace[1]['function'] ) { 1777 return false; 1778 } 1779 } 1780 1762 1781 // If no args passed then no extra checks need be performed 1763 1782 if ( func_num_args() <= 1 ) 1764 1783 return true;