Merge pull request #18156 from WPprodigy/fix-18155-image-cropping

[3.3] Use correct image options in customizer settings
This commit is contained in:
Mike Jolley 2017-12-14 12:56:52 +00:00 committed by GitHub
commit 3204e39a90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -389,7 +389,7 @@ class WC_Shop_Customizer {
if ( ! isset( $theme_support['single_image_width'] ) ) { if ( ! isset( $theme_support['single_image_width'] ) ) {
$wp_customize->add_setting( $wp_customize->add_setting(
'single_image_width', 'woocommerce_single_image_width',
array( array(
'default' => 600, 'default' => 600,
'type' => 'option', 'type' => 'option',
@ -400,12 +400,12 @@ class WC_Shop_Customizer {
); );
$wp_customize->add_control( $wp_customize->add_control(
'single_image_width', 'woocommerce_single_image_width',
array( array(
'label' => __( 'Main image width', 'woocommerce' ), 'label' => __( 'Main image width', 'woocommerce' ),
'description' => __( 'This is the width used by the main image on single product pages. These images will remain uncropped.', 'woocommerce' ), 'description' => __( 'This is the width used by the main image on single product pages. These images will remain uncropped.', 'woocommerce' ),
'section' => 'woocommerce_product_images', 'section' => 'woocommerce_product_images',
'settings' => 'single_image_width', 'settings' => 'woocommerce_single_image_width',
'type' => 'number', 'type' => 'number',
'input_attrs' => array( 'input_attrs' => array(
'min' => 0, 'min' => 0,
@ -417,7 +417,7 @@ class WC_Shop_Customizer {
if ( ! isset( $theme_support['thumbnail_image_width'] ) ) { if ( ! isset( $theme_support['thumbnail_image_width'] ) ) {
$wp_customize->add_setting( $wp_customize->add_setting(
'thumbnail_image_width', 'woocommerce_thumbnail_image_width',
array( array(
'default' => 300, 'default' => 300,
'type' => 'option', 'type' => 'option',
@ -428,12 +428,12 @@ class WC_Shop_Customizer {
); );
$wp_customize->add_control( $wp_customize->add_control(
'thumbnail_image_width', 'woocommerce_thumbnail_image_width',
array( array(
'label' => __( 'Thumbnail width', 'woocommerce' ), 'label' => __( 'Thumbnail width', 'woocommerce' ),
'description' => __( 'This size is used for product archives and product listings.', 'woocommerce' ), 'description' => __( 'This size is used for product archives and product listings.', 'woocommerce' ),
'section' => 'woocommerce_product_images', 'section' => 'woocommerce_product_images',
'settings' => 'thumbnail_image_width', 'settings' => 'woocommerce_thumbnail_image_width',
'type' => 'number', 'type' => 'number',
'input_attrs' => array( 'input_attrs' => array(
'min' => 0, 'min' => 0,