From 5c60995bd469dcc11fad94788531c5b17fe6a38b Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Tue, 5 Mar 2019 17:49:52 +0000 Subject: [PATCH] Accessibility: Replace media placeholder clickable divs with buttons. ` - + <# } #> <# } else { #>
-
- {{ data.button_labels.placeholder }} -
+ <# if ( data.canUpload ) { #> + + <# } #>
<# if ( data.defaultAttachment ) { #> <# } #> - <# if ( data.canUpload ) { #> - - <# } #>
<# } #> @@ -241,6 +237,7 @@ class WP_Customize_Media_Control extends WP_Customize_Control { case 'image': return array( 'select' => __( 'Select image' ), + 'site_icon' => __( 'Select site icon' ), 'change' => __( 'Change image' ), 'default' => __( 'Default' ), 'remove' => __( 'Remove' ), diff --git a/wp-includes/customize/class-wp-customize-site-icon-control.php b/wp-includes/customize/class-wp-customize-site-icon-control.php index 4d7bcf525a..bb4681ef62 100644 --- a/wp-includes/customize/class-wp-customize-site-icon-control.php +++ b/wp-includes/customize/class-wp-customize-site-icon-control.php @@ -47,14 +47,12 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control */ public function content_template() { ?> - + <# if ( data.label ) { #> + {{ data.label }} + <# } #> + <# if ( data.description ) { #> + {{{ data.description }}} + <# } #> <# if ( data.attachment && data.attachment.id ) { #>
@@ -74,22 +72,19 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control
<# if ( data.canUpload ) { #> - + <# } #>
<# } else { #>
-
- button_labels['placeholder']; ?> -
+ <# if ( data.canUpload ) { #> + + <# } #>
<# if ( data.defaultAttachment ) { #> <# } #> - <# if ( data.canUpload ) { #> - - <# } #>
<# } #> diff --git a/wp-includes/version.php b/wp-includes/version.php index cdda45d11c..b62dbdc85f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2-alpha-44794'; +$wp_version = '5.2-alpha-44796'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets/class-wp-widget-media-gallery.php b/wp-includes/widgets/class-wp-widget-media-gallery.php index 54cea50ad9..fc1a5dcf17 100644 --- a/wp-includes/widgets/class-wp-widget-media-gallery.php +++ b/wp-includes/widgets/class-wp-widget-media-gallery.php @@ -228,7 +228,7 @@ class WP_Widget_Media_Gallery extends WP_Widget_Media { <# } else { #>
-

l10n['no_media_selected'] ); ?>

+
<# } #> diff --git a/wp-includes/widgets/class-wp-widget-media.php b/wp-includes/widgets/class-wp-widget-media.php index 0c3b599e54..e6146bf8d3 100644 --- a/wp-includes/widgets/class-wp-widget-media.php +++ b/wp-includes/widgets/class-wp-widget-media.php @@ -411,7 +411,9 @@ abstract class WP_Widget_Media extends WP_Widget {

-
l10n['no_media_selected'] ); ?>
+

@@ -423,9 +425,6 @@ abstract class WP_Widget_Media extends WP_Widget { l10n['replace_media'] ); ?> -