Conditional settings

This commit is contained in:
Mike Jolley 2017-11-14 16:38:39 +00:00
parent 992d6e3aed
commit e222cfc9fa
1 changed files with 101 additions and 95 deletions

View File

@ -101,6 +101,7 @@ class WC_Customizer {
/**
* Grid settings.
*/
if ( ! has_filter( 'loop_shop_columns' ) ) {
$wp_customize->add_setting(
'woocommerce_catalog_columns',
array(
@ -154,10 +155,12 @@ class WC_Customizer {
),
)
);
}
/**
* Image settings.
*/
if ( ! isset( $theme_support['single_image_width'] ) ) {
$wp_customize->add_setting(
'single_image_width',
array(
@ -183,7 +186,9 @@ class WC_Customizer {
),
)
);
}
if ( ! isset( $theme_support['thumbnail_image_width'] ) ) {
$wp_customize->add_setting(
'thumbnail_image_width',
array(
@ -206,6 +211,7 @@ class WC_Customizer {
'input_attrs' => array( 'min' => 0, 'step' => 1 ),
)
);
}
include_once( WC_ABSPATH . 'includes/customizer/class-wc-customizer-control-cropping.php' );