Changeset 36915 for trunk/src/wp-includes/theme.php
- Timestamp:
- 03/09/2016 11:43:49 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/theme.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/theme.php
r36909 r36915 1733 1733 1734 1734 /** 1735 * Adds CSS to hide header text for custom logo, based on Customizer setting. 1736 * 1737 * @since 4.5.0 1738 * @access private 1739 */ 1740 function _custom_logo_header_styles() { 1741 if ( ! current_theme_supports( 'custom-header', 'header-text' ) && get_theme_support( 'custom-logo', 'header-text' ) && ! get_theme_mod( 'header_text', true ) ) { 1742 $classes = (array) get_theme_support( 'custom-logo', 'header-text' ); 1743 $classes = array_map( 'sanitize_html_class', $classes ); 1744 $classes = '.' . implode( ', .', $classes ); 1745 1746 ?> 1747 <!-- Custom Logo: hide header text --> 1748 <style id="custom-logo-css" type="text/css"> 1749 <?php echo $classes; ?> { 1750 position: absolute; 1751 clip: rect(1px, 1px, 1px, 1px); 1752 } 1753 </style> 1754 <?php 1755 } 1756 } 1757 1758 /** 1735 1759 * Gets the theme support arguments passed when registering that support 1736 1760 * … … 1928 1952 * @since 3.0.0 1929 1953 * @since 4.3.0 Also removes `header_image_data`. 1954 * @since 4.5.0 Also removes custom logo theme mods. 1930 1955 * 1931 1956 * @param int $id The attachment id. … … 1935 1960 $header_image = get_header_image(); 1936 1961 $background_image = get_background_image(); 1962 $custom_logo_id = get_theme_mod( 'custom_logo' ); 1963 1964 if ( $custom_logo_id && $custom_logo_id == $id ) { 1965 remove_theme_mod( 'custom_logo' ); 1966 remove_theme_mod( 'header_text' ); 1967 } 1937 1968 1938 1969 if ( $header_image && $header_image == $attachment_image ) {
Note: See TracChangeset
for help on using the changeset viewer.