Ticket #36255: 36255.7.diff
| File 36255.7.diff, 2.6 KB (added by , 10 years ago) |
|---|
-
src/wp-includes/theme.php
1559 1559 $args[0] = array_merge( $_wp_theme_features['html5'][0], $args[0] ); 1560 1560 break; 1561 1561 1562 case 'custom-logo': 1563 $defaults = array( 1564 'width' => null, 1565 'height' => null, 1566 'flex-width' => false, 1567 'flex-height' => false, 1568 'header-text' => '', 1569 ); 1570 $args[0] = wp_parse_args( array_intersect_key( $args[0], $defaults ), $defaults ); 1571 1572 if ( is_null( $args[0]['width'] ) && is_null( $args[0]['height'] ) ) { 1573 $args[0]['flex-width'] = true; 1574 $args[0]['flex-height'] = true; 1575 } 1576 break; 1577 1562 1578 case 'custom-header-uploads' : 1563 1579 return add_theme_support( 'custom-header', array( 'uploads' => true ) ); 1564 1580 -
src/wp-includes/class-wp-customize-manager.php
1959 1959 'transport' => 'postMessage', 1960 1960 ) ); 1961 1961 1962 $this->add_control( new WP_Customize_Media_Control( $this, 'custom_logo', array( 1963 'label' => __( 'Logo' ), 1964 'section' => 'title_tagline', 1965 'priority' => 8, 1966 'mime_type' => 'image', 1962 $custom_logo_args = get_theme_support( 'custom-logo' ); 1963 $this->add_control( new WP_Customize_Cropped_Image_Control( $this, 'custom_logo', array( 1964 'label' => __( 'Logo' ), 1965 'section' => 'title_tagline', 1966 'priority' => 8, 1967 'height' => $custom_logo_args[0]['height'], 1968 'width' => $custom_logo_args[0]['width'], 1969 'flex_height' => $custom_logo_args[0]['flex-height'], 1970 'flex_width' => $custom_logo_args[0]['flex-width'], 1967 1971 'button_labels' => array( 1968 1972 'select' => __( 'Select logo' ), 1969 1973 'change' => __( 'Change logo' ), -
src/wp-content/themes/twentyfifteen/functions.php
108 108 * 109 109 * @since Twenty Fifteen 1.5 110 110 */ 111 add_image_size( 'twentyfifteen-logo', 248, 248 ); 112 add_theme_support( 'custom-logo', array( 'size' => 'twentyfifteen-logo' ) ); 111 add_theme_support( 'custom-logo', array( 112 'height' => 248, 113 'width' => 248, 114 'flex-height' => true, 115 ) ); 113 116 114 117 $color_scheme = twentyfifteen_get_color_scheme(); 115 118 $default_color = trim( $color_scheme[0], '#' );