Merged in feature/81-dev-dev01 (pull request #5)
auto-patch 81-dev-dev01-2023-12-05T22_45_26 * auto-patch 81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
@@ -82,5 +82,4 @@ class WP_Customize_Cropped_Image_Control extends WP_Customize_Image_Control {
|
||||
$this->json['flex_width'] = absint( $this->flex_width );
|
||||
$this->json['flex_height'] = absint( $this->flex_height );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -62,7 +62,6 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
|
||||
'get_url' => 'get_header_image',
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -213,23 +212,23 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
|
||||
<p class="customizer-section-intro customize-control-description">
|
||||
<?php
|
||||
if ( current_theme_supports( 'custom-header', 'video' ) ) {
|
||||
_e( 'Click “Add new image” to upload an image file from your computer. Your theme works best with an image that matches the size of your video — you’ll be able to crop your image once you upload it for a perfect fit.' );
|
||||
_e( 'Click “Add New Image” to upload an image file from your computer. Your theme works best with an image that matches the size of your video — you’ll be able to crop your image once you upload it for a perfect fit.' );
|
||||
} elseif ( $width && $height ) {
|
||||
printf(
|
||||
/* translators: %s: Header size in pixels. */
|
||||
__( 'Click “Add new image” to upload an image file from your computer. Your theme works best with an image with a header size of %s pixels — you’ll be able to crop your image once you upload it for a perfect fit.' ),
|
||||
__( 'Click “Add New Image” to upload an image file from your computer. Your theme works best with an image with a header size of %s pixels — you’ll be able to crop your image once you upload it for a perfect fit.' ),
|
||||
sprintf( '<strong>%s × %s</strong>', $width, $height )
|
||||
);
|
||||
} elseif ( $width ) {
|
||||
printf(
|
||||
/* translators: %s: Header width in pixels. */
|
||||
__( 'Click “Add new image” to upload an image file from your computer. Your theme works best with an image with a header width of %s pixels — you’ll be able to crop your image once you upload it for a perfect fit.' ),
|
||||
__( 'Click “Add New Image” to upload an image file from your computer. Your theme works best with an image with a header width of %s pixels — you’ll be able to crop your image once you upload it for a perfect fit.' ),
|
||||
sprintf( '<strong>%s</strong>', $width )
|
||||
);
|
||||
} else {
|
||||
printf(
|
||||
/* translators: %s: Header height in pixels. */
|
||||
__( 'Click “Add new image” to upload an image file from your computer. Your theme works best with an image with a header height of %s pixels — you’ll be able to crop your image once you upload it for a perfect fit.' ),
|
||||
__( 'Click “Add New Image” to upload an image file from your computer. Your theme works best with an image with a header height of %s pixels — you’ll be able to crop your image once you upload it for a perfect fit.' ),
|
||||
sprintf( '<strong>%s</strong>', $height )
|
||||
);
|
||||
}
|
||||
@@ -247,7 +246,7 @@ class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {
|
||||
<div class="actions">
|
||||
<?php if ( current_user_can( 'upload_files' ) ) : ?>
|
||||
<button type="button"<?php echo $visibility; ?> class="button remove" aria-label="<?php esc_attr_e( 'Hide header image' ); ?>"><?php _e( 'Hide image' ); ?></button>
|
||||
<button type="button" class="button new" id="header_image-button" aria-label="<?php esc_attr_e( 'Add new header image' ); ?>"><?php _e( 'Add new image' ); ?></button>
|
||||
<button type="button" class="button new" id="header_image-button" aria-label="<?php esc_attr_e( 'Add New Header Image' ); ?>"><?php _e( 'Add New Image' ); ?></button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="choices">
|
||||
|
||||
@@ -183,7 +183,6 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
|
||||
throw new Exception( "Supplied nav_menu_item value missing property: $missing" );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -878,7 +877,6 @@ class WP_Customize_Nav_Menu_Item_Setting extends WP_Customize_Setting {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -193,7 +193,7 @@ final class WP_Customize_Selective_Refresh {
|
||||
);
|
||||
|
||||
// Export data to JS.
|
||||
printf( '<script>var _customizePartialRefreshExports = %s;</script>', wp_json_encode( $exports ) );
|
||||
wp_print_inline_script_tag( sprintf( 'var _customizePartialRefreshExports = %s;', wp_json_encode( $exports ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -240,7 +240,15 @@ class WP_Customize_Theme_Control extends WP_Customize_Control {
|
||||
<button type="button" class="button button-primary customize-theme" aria-label="<?php echo esc_attr( $customize_label ); ?>"><?php _e( 'Customize' ); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="notice notice-success notice-alt"><p><?php _ex( 'Installed', 'theme' ); ?></p></div>
|
||||
<?php
|
||||
wp_admin_notice(
|
||||
_x( 'Installed', 'theme' ),
|
||||
array(
|
||||
'type' => 'success',
|
||||
'additional_classes' => array( 'notice-alt' ),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<# } else if ( 'installed' === data.theme.type ) { #>
|
||||
<# if ( data.theme.blockTheme ) { #>
|
||||
<div class="theme-id-container">
|
||||
@@ -255,21 +263,26 @@ class WP_Customize_Theme_Control extends WP_Customize_Control {
|
||||
<# } #>
|
||||
</div>
|
||||
</div>
|
||||
<div class="notice notice-error notice-alt"><p>
|
||||
<?php
|
||||
_e( 'This theme doesn\'t support Customizer.' );
|
||||
?>
|
||||
<?php $customizer_not_supported_message = __( 'This theme doesn\'t support Customizer.' ); ?>
|
||||
<# if ( data.theme.actions.activate ) { #>
|
||||
<?php
|
||||
echo ' ';
|
||||
printf(
|
||||
$customizer_not_supported_message .= ' ' . sprintf(
|
||||
/* translators: %s: URL to the themes page (also it activates the theme). */
|
||||
__( 'However, you can still <a href="%s">activate this theme</a>, and use the Site Editor to customize it.' ),
|
||||
'{{{ data.theme.actions.activate }}}'
|
||||
);
|
||||
?>
|
||||
<# } #>
|
||||
</p></div>
|
||||
|
||||
<?php
|
||||
wp_admin_notice(
|
||||
$customizer_not_supported_message,
|
||||
array(
|
||||
'type' => 'error',
|
||||
'additional_classes' => array( 'notice-alt' ),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<# } else { #>
|
||||
<div class="theme-id-container">
|
||||
<h3 class="theme-name" id="{{ data.section }}-{{ data.theme.id }}-name">{{ data.theme.name }}</h3>
|
||||
@@ -281,7 +294,15 @@ class WP_Customize_Theme_Control extends WP_Customize_Control {
|
||||
<# } #>
|
||||
</div>
|
||||
</div>
|
||||
<div class="notice notice-success notice-alt"><p><?php _ex( 'Installed', 'theme' ); ?></p></div>
|
||||
<?php
|
||||
wp_admin_notice(
|
||||
_x( 'Installed', 'theme' ),
|
||||
array(
|
||||
'type' => 'success',
|
||||
'additional_classes' => array( 'notice-alt' ),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<# } #>
|
||||
<# } else { #>
|
||||
<div class="theme-id-container">
|
||||
|
||||
@@ -48,7 +48,7 @@ class WP_Customize_Themes_Section extends WP_Customize_Section {
|
||||
public $filter_type = 'local';
|
||||
|
||||
/**
|
||||
* Get section parameters for JS.
|
||||
* Gets section parameters for JS.
|
||||
*
|
||||
* @since 4.9.0
|
||||
* @return array Exported parameters.
|
||||
@@ -62,7 +62,7 @@ class WP_Customize_Themes_Section extends WP_Customize_Section {
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a themes section as a JS template.
|
||||
* Renders a themes section as a JS template.
|
||||
*
|
||||
* The template is only rendered by PHP once, so all actions are prepared at once on the server side.
|
||||
*
|
||||
@@ -112,10 +112,10 @@ class WP_Customize_Themes_Section extends WP_Customize_Section {
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the filter bar portion of a themes section as a JS template.
|
||||
* Renders the filter bar portion of a themes section as a JS template.
|
||||
*
|
||||
* The template is only rendered by PHP once, so all actions are prepared at once on the server side.
|
||||
* The filter bar container is rendered by @see `render_template()`.
|
||||
* The filter bar container is rendered by {@see render_template()}.
|
||||
*
|
||||
* @since 4.9.0
|
||||
*/
|
||||
@@ -177,9 +177,9 @@ class WP_Customize_Themes_Section extends WP_Customize_Section {
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the filter drawer portion of a themes section as a JS template.
|
||||
* Renders the filter drawer portion of a themes section as a JS template.
|
||||
*
|
||||
* The filter bar container is rendered by @see `render_template()`.
|
||||
* The filter bar container is rendered by {@see render_template()}.
|
||||
*
|
||||
* @since 4.9.0
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user