Changeset 36915
- Timestamp:
- 03/09/2016 11:43:49 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/admin.php
r36838 r36915 73 73 require_once(ABSPATH . 'wp-admin/includes/class-wp-site-icon.php'); 74 74 75 /** WordPress Custom Logo API */76 require_once(ABSPATH . 'wp-admin/includes/class-wp-custom-logo.php');77 78 75 /** WordPress Update Administration API */ 79 76 require_once(ABSPATH . 'wp-admin/includes/update.php'); -
trunk/src/wp-includes/class-wp-customize-manager.php
r36912 r36915 1923 1923 ) ); 1924 1924 1925 // Add a setting to hide header text if the theme isn't supporting the feature itself. 1926 // @todo 1927 if ( ! current_theme_supports( 'custom-header' ) ) { 1925 // Add a setting to hide header text if the theme doesn't support custom headers. 1926 if ( ! current_theme_supports( 'custom-header', 'header-text' ) ) { 1928 1927 $this->add_setting( 'header_text', array( 1928 'theme_supports' => array( 'custom-logo', 'header-text' ), 1929 1929 'default' => 1, 1930 1930 'sanitize_callback' => 'absint', 1931 'transport' => 'postMessage',1932 1931 ) ); 1933 1932 -
trunk/src/wp-includes/default-filters.php
r36617 r36915 372 372 // Theme 373 373 add_action( 'wp_loaded', '_custom_header_background_just_in_time' ); 374 add_action( 'wp_head', '_custom_logo_header_styles' ); 374 375 add_action( 'plugins_loaded', '_wp_customize_include' ); 375 376 add_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings' ); -
trunk/src/wp-includes/general-template.php
r36837 r36915 881 881 restore_current_blog(); 882 882 } 883 $size = get_theme_support( 'custom-logo' ); 884 $size = $size[0]['size']; 883 $size = get_theme_support( 'custom-logo', 'size' ); 885 884 886 885 // We have a logo. Logo is go. -
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.