Update WordPress to 5.2
This commit is contained in:
parent
489b5a5914
commit
e00f87f2f5
599 changed files with 119573 additions and 55990 deletions
|
@ -92,7 +92,7 @@ class WP_Customize_Media_Control extends WP_Customize_Control {
|
|||
'url' => $this->setting->default,
|
||||
'type' => $type,
|
||||
'icon' => wp_mime_type_icon( $type ),
|
||||
'title' => basename( $this->setting->default ),
|
||||
'title' => wp_basename( $this->setting->default ),
|
||||
);
|
||||
|
||||
if ( 'image' === $type ) {
|
||||
|
@ -132,12 +132,11 @@ class WP_Customize_Media_Control extends WP_Customize_Control {
|
|||
public function content_template() {
|
||||
?>
|
||||
<#
|
||||
var selectButtonId = _.uniqueId( 'customize-media-control-button-' );
|
||||
var descriptionId = _.uniqueId( 'customize-media-control-description-' );
|
||||
var describedByAttr = data.description ? ' aria-describedby="' + descriptionId + '" ' : '';
|
||||
#>
|
||||
<# if ( data.label ) { #>
|
||||
<label class="customize-control-title" for="{{ selectButtonId }}">{{ data.label }}</label>
|
||||
<span class="customize-control-title">{{ data.label }}</span>
|
||||
<# } #>
|
||||
<div class="customize-control-notifications-container"></div>
|
||||
<# if ( data.description ) { #>
|
||||
|
@ -182,22 +181,19 @@ class WP_Customize_Media_Control extends WP_Customize_Control {
|
|||
<div class="actions">
|
||||
<# if ( data.canUpload ) { #>
|
||||
<button type="button" class="button remove-button">{{ data.button_labels.remove }}</button>
|
||||
<button type="button" class="button upload-button control-focus" id="{{ selectButtonId }}" {{{ describedByAttr }}}>{{ data.button_labels.change }}</button>
|
||||
<button type="button" class="button upload-button control-focus" {{{ describedByAttr }}}>{{ data.button_labels.change }}</button>
|
||||
<# } #>
|
||||
</div>
|
||||
</div>
|
||||
<# } else { #>
|
||||
<div class="attachment-media-view">
|
||||
<div class="placeholder">
|
||||
{{ data.button_labels.placeholder }}
|
||||
</div>
|
||||
<# if ( data.canUpload ) { #>
|
||||
<button type="button" class="upload-button button-add-media" {{{ describedByAttr }}}>{{ data.button_labels.select }}</button>
|
||||
<# } #>
|
||||
<div class="actions">
|
||||
<# if ( data.defaultAttachment ) { #>
|
||||
<button type="button" class="button default-button">{{ data.button_labels['default'] }}</button>
|
||||
<# } #>
|
||||
<# if ( data.canUpload ) { #>
|
||||
<button type="button" class="button upload-button" id="{{ selectButtonId }}" {{{ describedByAttr }}}>{{ data.button_labels.select }}</button>
|
||||
<# } #>
|
||||
</div>
|
||||
</div>
|
||||
<# } #>
|
||||
|
@ -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' ),
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
* Customize Nav Menu Control Class.
|
||||
*
|
||||
* @since 4.3.0
|
||||
*
|
||||
* @see WP_Customize_Control
|
||||
*/
|
||||
class WP_Customize_Nav_Menu_Control extends WP_Customize_Control {
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
* Customize control to represent the name field for a given menu.
|
||||
*
|
||||
* @since 4.3.0
|
||||
*
|
||||
* @see WP_Customize_Control
|
||||
*/
|
||||
class WP_Customize_Nav_Menu_Item_Control extends WP_Customize_Control {
|
||||
|
||||
|
|
|
@ -47,14 +47,12 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control
|
|||
*/
|
||||
public function content_template() {
|
||||
?>
|
||||
<label for="{{ data.settings['default'] }}-button">
|
||||
<# if ( data.label ) { #>
|
||||
<span class="customize-control-title">{{ data.label }}</span>
|
||||
<# } #>
|
||||
<# if ( data.description ) { #>
|
||||
<span class="description customize-control-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
</label>
|
||||
<# if ( data.label ) { #>
|
||||
<span class="customize-control-title">{{ data.label }}</span>
|
||||
<# } #>
|
||||
<# if ( data.description ) { #>
|
||||
<span class="description customize-control-description">{{{ data.description }}}</span>
|
||||
<# } #>
|
||||
|
||||
<# if ( data.attachment && data.attachment.id ) { #>
|
||||
<div class="attachment-media-view">
|
||||
|
@ -74,22 +72,19 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control
|
|||
<div class="actions">
|
||||
<# if ( data.canUpload ) { #>
|
||||
<button type="button" class="button remove-button"><?php echo $this->button_labels['remove']; ?></button>
|
||||
<button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['change']; ?></button>
|
||||
<button type="button" class="button upload-button"><?php echo $this->button_labels['change']; ?></button>
|
||||
<# } #>
|
||||
</div>
|
||||
</div>
|
||||
<# } else { #>
|
||||
<div class="attachment-media-view">
|
||||
<div class="placeholder">
|
||||
<?php echo $this->button_labels['placeholder']; ?>
|
||||
</div>
|
||||
<# if ( data.canUpload ) { #>
|
||||
<button type="button" class="upload-button button-add-media"><?php echo $this->button_labels['site_icon']; ?></button>
|
||||
<# } #>
|
||||
<div class="actions">
|
||||
<# if ( data.defaultAttachment ) { #>
|
||||
<button type="button" class="button default-button"><?php echo $this->button_labels['default']; ?></button>
|
||||
<# } #>
|
||||
<# if ( data.canUpload ) { #>
|
||||
<button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button"><?php echo $this->button_labels['select']; ?></button>
|
||||
<# } #>
|
||||
</div>
|
||||
</div>
|
||||
<# } #>
|
||||
|
|
|
@ -96,7 +96,7 @@ class WP_Widget_Form_Customize_Control extends WP_Customize_Control {
|
|||
}
|
||||
|
||||
// Get the widget_control and widget_content.
|
||||
require_once ABSPATH . '/wp-admin/includes/widgets.php';
|
||||
require_once ABSPATH . 'wp-admin/includes/widgets.php';
|
||||
|
||||
$widget = $wp_registered_widgets[ $this->widget_id ];
|
||||
if ( ! isset( $widget['params'][0] ) ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue