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:
Tony Volpe
2023-12-05 23:05:59 +00:00
parent ba16964e7a
commit 725d3043d5
1463 changed files with 142461 additions and 89421 deletions

View File

@@ -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 );
}
}

View File

@@ -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 &#8220;Add new image&#8221; to upload an image file from your computer. Your theme works best with an image that matches the size of your video &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' );
_e( 'Click &#8220;Add New Image&#8221; to upload an image file from your computer. Your theme works best with an image that matches the size of your video &#8212; you&#8217;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 &#8220;Add new image&#8221; to upload an image file from your computer. Your theme works best with an image with a header size of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
__( 'Click &#8220;Add New Image&#8221; to upload an image file from your computer. Your theme works best with an image with a header size of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
sprintf( '<strong>%s &times; %s</strong>', $width, $height )
);
} elseif ( $width ) {
printf(
/* translators: %s: Header width in pixels. */
__( 'Click &#8220;Add new image&#8221; to upload an image file from your computer. Your theme works best with an image with a header width of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
__( 'Click &#8220;Add New Image&#8221; to upload an image file from your computer. Your theme works best with an image with a header width of %s pixels &#8212; you&#8217;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 &#8220;Add new image&#8221; to upload an image file from your computer. Your theme works best with an image with a header height of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
__( 'Click &#8220;Add New Image&#8221; to upload an image file from your computer. Your theme works best with an image with a header height of %s pixels &#8212; you&#8217;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">

View File

@@ -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 {
}
}
}
}
/**

View File

@@ -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 ) ) );
}
/**

View File

@@ -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">

View File

@@ -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
*/