diff --git a/src/wp-admin/custom-background.php b/src/wp-admin/custom-background.php index 73855e5170..61a700af5e 100644 --- a/src/wp-admin/custom-background.php +++ b/src/wp-admin/custom-background.php @@ -259,6 +259,7 @@ class Custom_Background { +
@@ -278,6 +279,7 @@ class Custom_Background {
+ diff --git a/src/wp-admin/custom-header.php b/src/wp-admin/custom-header.php index 9753897ecb..966d356639 100644 --- a/src/wp-admin/custom-header.php +++ b/src/wp-admin/custom-header.php @@ -509,7 +509,7 @@ class Custom_Image_Header { - + diff --git a/src/wp-includes/class-wp-customize-control.php b/src/wp-includes/class-wp-customize-control.php index cf41933eab..29ddae08af 100644 --- a/src/wp-includes/class-wp-customize-control.php +++ b/src/wp-includes/class-wp-customize-control.php @@ -721,6 +721,7 @@ class WP_Customize_Media_Control extends WP_Customize_Control { $this->json['label'] = html_entity_decode( $this->label, ENT_QUOTES, get_bloginfo( 'charset' ) ); $this->json['mime_type'] = $this->mime_type; $this->json['button_labels'] = $this->button_labels; + $this->json['canUpload'] = current_user_can( 'upload_files' ); $value = $this->value(); @@ -823,9 +824,11 @@ class WP_Customize_Media_Control extends WP_Customize_Control {
+ <# if ( data.canUpload ) { #>
+ <# } #>
<# } else { #>
@@ -843,7 +846,9 @@ class WP_Customize_Media_Control extends WP_Customize_Control { <# if ( data.defaultAttachment ) { #> <# } #> + <# if ( data.canUpload ) { #> + <# } #>
<# } #> @@ -1158,8 +1163,6 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control { $width = absint( get_theme_support( 'custom-header', 'width' ) ); $height = absint( get_theme_support( 'custom-header', 'height' ) ); ?> - -

+
+