diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
index ea30b93..6bf1707 100644
|
|
|
final class WP_Customize_Manager { |
| 1833 | 1833 | * Register some default controls. |
| 1834 | 1834 | * |
| 1835 | 1835 | * @since 3.4.0 |
| | 1836 | * |
| | 1837 | * @global array $_wp_additional_image_sizes |
| 1836 | 1838 | */ |
| 1837 | 1839 | public function register_controls() { |
| | 1840 | global $_wp_additional_image_sizes; |
| 1838 | 1841 | |
| 1839 | 1842 | /* Panel, Section, and Control Types */ |
| 1840 | 1843 | $this->register_panel_type( 'WP_Customize_Panel' ); |
| … |
… |
final class WP_Customize_Manager { |
| 1962 | 1965 | 'transport' => 'postMessage', |
| 1963 | 1966 | ) ); |
| 1964 | 1967 | |
| 1965 | | $this->add_control( new WP_Customize_Media_Control( $this, 'custom_logo', array( |
| | 1968 | $custom_logo_control_args = array( |
| 1966 | 1969 | 'label' => __( 'Logo' ), |
| 1967 | 1970 | 'section' => 'title_tagline', |
| 1968 | 1971 | 'priority' => 8, |
| 1969 | | 'mime_type' => 'image', |
| 1970 | 1972 | 'button_labels' => array( |
| 1971 | 1973 | 'select' => __( 'Select logo' ), |
| 1972 | 1974 | 'change' => __( 'Change logo' ), |
| … |
… |
final class WP_Customize_Manager { |
| 1976 | 1978 | 'frame_title' => __( 'Select logo' ), |
| 1977 | 1979 | 'frame_button' => __( 'Choose logo' ), |
| 1978 | 1980 | ), |
| 1979 | | ) ) ); |
| | 1981 | ); |
| | 1982 | $custom_logo_size = get_theme_support( 'custom-logo', 'size' ); |
| | 1983 | if ( empty( $custom_logo_size ) || ! has_image_size( $custom_logo_size ) ) { |
| | 1984 | $custom_logo_control_class = 'WP_Customize_Media_Control'; |
| | 1985 | $custom_logo_control_args['mime'] = 'image'; |
| | 1986 | } else { |
| | 1987 | $custom_logo_control_class = 'WP_Customize_Cropped_Image_Control'; |
| | 1988 | $custom_logo_control_args['width'] = $_wp_additional_image_sizes[ $custom_logo_size ]['width']; |
| | 1989 | $custom_logo_control_args['height'] = $_wp_additional_image_sizes[ $custom_logo_size ]['height']; |
| | 1990 | $custom_logo_control_args['flex_width'] = empty( $_wp_additional_image_sizes[ $custom_logo_size ]['crop'] ); |
| | 1991 | $custom_logo_control_args['flex_height'] = empty( $_wp_additional_image_sizes[ $custom_logo_size ]['crop'] ); |
| | 1992 | } |
| | 1993 | $this->add_control( new $custom_logo_control_class( $this, 'custom_logo', $custom_logo_control_args ) ); |
| 1980 | 1994 | |
| 1981 | 1995 | if ( isset( $this->selective_refresh ) ) { |
| 1982 | 1996 | $this->selective_refresh->add_partial( 'custom_logo', array( |