Fix indentation & space usage
This commit is contained in:
parent
eff5910640
commit
9c8be5118d
|
@ -17,7 +17,7 @@ if ( ! function_exists( 'understrap_woocommerce_support' ) ) {
|
|||
function understrap_woocommerce_support() {
|
||||
add_theme_support( 'woocommerce' );
|
||||
|
||||
// Add New Woocommerce 3.0.0 Product Gallery support
|
||||
// Add New Woocommerce 3.0.0 Product Gallery support.
|
||||
add_theme_support( 'wc-product-gallery-lightbox' );
|
||||
add_theme_support( 'wc-product-gallery-zoom' );
|
||||
add_theme_support( 'wc-product-gallery-slider' );
|
||||
|
@ -30,14 +30,14 @@ if ( ! function_exists( 'understrap_woocommerce_support' ) ) {
|
|||
/**
|
||||
* First unhook the WooCommerce wrappers
|
||||
*/
|
||||
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
|
||||
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
|
||||
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 );
|
||||
remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 );
|
||||
|
||||
/**
|
||||
* Then hook in your own functions to display the wrappers your theme requires
|
||||
*/
|
||||
add_action('woocommerce_before_main_content', 'understrap_woocommerce_wrapper_start', 10);
|
||||
add_action('woocommerce_after_main_content', 'understrap_woocommerce_wrapper_end', 10);
|
||||
add_action( 'woocommerce_before_main_content', 'understrap_woocommerce_wrapper_start', 10 );
|
||||
add_action( 'woocommerce_after_main_content', 'understrap_woocommerce_wrapper_end', 10 );
|
||||
if ( ! function_exists( 'understrap_woocommerce_wrapper_start' ) ) {
|
||||
function understrap_woocommerce_wrapper_start() {
|
||||
$container = get_theme_mod( 'understrap_container_type' );
|
||||
|
@ -49,7 +49,7 @@ if ( ! function_exists( 'understrap_woocommerce_wrapper_start' ) ) {
|
|||
}
|
||||
}
|
||||
if ( ! function_exists( 'understrap_woocommerce_wrapper_end' ) ) {
|
||||
function understrap_woocommerce_wrapper_end() {
|
||||
function understrap_woocommerce_wrapper_end() {
|
||||
echo '</main><!-- #main -->';
|
||||
get_template_part( 'global-templates/right-sidebar-check' );
|
||||
echo '</div><!-- .row -->';
|
||||
|
@ -69,12 +69,12 @@ function understrap_woocommerce_wrapper_end() {
|
|||
*
|
||||
* @return mixed
|
||||
*/
|
||||
if ( ! function_exists ( 'understrap_wc_form_field_args' ) ) {
|
||||
if ( ! function_exists( 'understrap_wc_form_field_args' ) ) {
|
||||
function understrap_wc_form_field_args( $args, $key, $value = null ) {
|
||||
// Start field type switch case.
|
||||
switch ( $args['type'] ) {
|
||||
/* Targets all select input type elements, except the country and state select input types */
|
||||
case 'select' :
|
||||
case 'select':
|
||||
// Add a class to the field's html element wrapper - woocommerce
|
||||
// input types (fields) are often wrapped within a <p></p> tag.
|
||||
$args['class'][] = 'form-group';
|
||||
|
@ -90,13 +90,13 @@ if ( ! function_exists ( 'understrap_wc_form_field_args' ) ) {
|
|||
break;
|
||||
// By default WooCommerce will populate a select with the country names - $args
|
||||
// defined for this specific input type targets only the country select element.
|
||||
case 'country' :
|
||||
case 'country':
|
||||
$args['class'][] = 'form-group single-country';
|
||||
$args['label_class'] = array( 'control-label' );
|
||||
break;
|
||||
// By default WooCommerce will populate a select with state names - $args defined
|
||||
// for this specific input type targets only the country select element.
|
||||
case 'state' :
|
||||
case 'state':
|
||||
// Add class to the field's html element wrapper.
|
||||
$args['class'][] = 'form-group';
|
||||
// add class to the form input itself.
|
||||
|
@ -108,28 +108,28 @@ if ( ! function_exists ( 'understrap_wc_form_field_args' ) ) {
|
|||
'aria-hidden' => 'true',
|
||||
);
|
||||
break;
|
||||
case 'password' :
|
||||
case 'text' :
|
||||
case 'email' :
|
||||
case 'tel' :
|
||||
case 'number' :
|
||||
case 'password':
|
||||
case 'text':
|
||||
case 'email':
|
||||
case 'tel':
|
||||
case 'number':
|
||||
$args['class'][] = 'form-group';
|
||||
$args['input_class'] = array( 'form-control', 'input-lg' );
|
||||
$args['label_class'] = array( 'control-label' );
|
||||
break;
|
||||
case 'textarea' :
|
||||
case 'textarea':
|
||||
$args['input_class'] = array( 'form-control', 'input-lg' );
|
||||
$args['label_class'] = array( 'control-label' );
|
||||
break;
|
||||
case 'checkbox' :
|
||||
case 'checkbox':
|
||||
$args['label_class'] = array( 'custom-control custom-checkbox' );
|
||||
$args['input_class'] = array( 'custom-control-input', 'input-lg' );
|
||||
break;
|
||||
case 'radio' :
|
||||
case 'radio':
|
||||
$args['label_class'] = array( 'custom-control custom-radio' );
|
||||
$args['input_class'] = array( 'custom-control-input', 'input-lg' );
|
||||
break;
|
||||
default :
|
||||
default:
|
||||
$args['class'][] = 'form-group';
|
||||
$args['input_class'] = array( 'form-control', 'input-lg' );
|
||||
$args['label_class'] = array( 'control-label' );
|
||||
|
|
Reference in New Issue