Fix PHPCS violations

This commit is contained in:
Tiago Noronha 2018-06-22 15:11:39 +01:00
parent edc53f220c
commit 169c21e35a
31 changed files with 1180 additions and 809 deletions

View file

@ -23,12 +23,12 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
* @since 1.0
*/
public function __construct() {
add_action( 'customize_register', array( $this, 'customize_register' ), 10 );
add_filter( 'body_class', array( $this, 'layout_class' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'add_customizer_css' ), 130 );
add_action( 'customize_register', array( $this, 'customize_register' ), 10 );
add_filter( 'body_class', array( $this, 'layout_class' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'add_customizer_css' ), 130 );
add_action( 'customize_controls_print_styles', array( $this, 'customizer_custom_control_css' ) );
add_action( 'customize_register', array( $this, 'edit_default_customizer_settings' ), 99 );
add_action( 'init', array( $this, 'default_theme_mod_values' ), 10 );
add_action( 'customize_register', array( $this, 'edit_default_customizer_settings' ), 99 );
add_action( 'init', array( $this, 'default_theme_mod_values' ), 10 );
}
/**
@ -37,26 +37,28 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
* @return array
*/
public static function get_storefront_default_setting_values() {
return apply_filters( 'storefront_setting_default_values', $args = array(
'storefront_heading_color' => '#333333',
'storefront_text_color' => '#6d6d6d',
'storefront_accent_color' => '#96588a',
'storefront_hero_heading_color' => '#000000',
'storefront_hero_text_color' => '#000000',
'storefront_header_background_color' => '#ffffff',
'storefront_header_text_color' => '#404040',
'storefront_header_link_color' => '#333333',
'storefront_footer_background_color' => '#f0f0f0',
'storefront_footer_heading_color' => '#333333',
'storefront_footer_text_color' => '#6d6d6d',
'storefront_footer_link_color' => '#333333',
'storefront_button_background_color' => '#eeeeee',
'storefront_button_text_color' => '#333333',
'storefront_button_alt_background_color' => '#333333',
'storefront_button_alt_text_color' => '#ffffff',
'storefront_layout' => 'right',
'background_color' => 'ffffff',
) );
return apply_filters(
'storefront_setting_default_values', $args = array(
'storefront_heading_color' => '#333333',
'storefront_text_color' => '#6d6d6d',
'storefront_accent_color' => '#96588a',
'storefront_hero_heading_color' => '#000000',
'storefront_hero_text_color' => '#000000',
'storefront_header_background_color' => '#ffffff',
'storefront_header_text_color' => '#404040',
'storefront_header_link_color' => '#333333',
'storefront_footer_background_color' => '#f0f0f0',
'storefront_footer_heading_color' => '#333333',
'storefront_footer_text_color' => '#6d6d6d',
'storefront_footer_link_color' => '#333333',
'storefront_button_background_color' => '#eeeeee',
'storefront_button_text_color' => '#333333',
'storefront_button_alt_background_color' => '#333333',
'storefront_button_alt_text_color' => '#ffffff',
'storefront_layout' => 'right',
'background_color' => 'ffffff',
)
);
}
/**
@ -73,7 +75,7 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
/**
* Get theme mod value.
*
* @param string $value
* @param string $value Theme modification value.
* @return string
*/
public function get_theme_mod_value( $value ) {
@ -128,20 +130,26 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
$wp_customize->selective_refresh->add_partial( 'custom_logo', array(
'selector' => '.site-branding',
'render_callback' => array( $this, 'get_site_logo' ),
) );
$wp_customize->selective_refresh->add_partial(
'custom_logo', array(
'selector' => '.site-branding',
'render_callback' => array( $this, 'get_site_logo' ),
)
);
$wp_customize->selective_refresh->add_partial( 'blogname', array(
'selector' => '.site-title.beta a',
'render_callback' => array( $this, 'get_site_name' ),
) );
$wp_customize->selective_refresh->add_partial(
'blogname', array(
'selector' => '.site-title.beta a',
'render_callback' => array( $this, 'get_site_name' ),
)
);
$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
'selector' => '.site-description',
'render_callback' => array( $this, 'get_site_description' ),
) );
$wp_customize->selective_refresh->add_partial(
'blogdescription', array(
'selector' => '.site-description',
'render_callback' => array( $this, 'get_site_description' ),
)
);
}
/**
@ -157,322 +165,444 @@ if ( ! class_exists( 'Storefront_Customizer' ) ) :
/**
* Add the typography section
*/
$wp_customize->add_section( 'storefront_typography' , array(
'title' => __( 'Typography', 'storefront' ),
'priority' => 45,
) );
$wp_customize->add_section(
'storefront_typography', array(
'title' => __( 'Typography', 'storefront' ),
'priority' => 45,
)
);
/**
* Heading color
*/
$wp_customize->add_setting( 'storefront_heading_color', array(
'default' => apply_filters( 'storefront_default_heading_color', '#484c51' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_heading_color', array(
'default' => apply_filters( 'storefront_default_heading_color', '#484c51' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_heading_color', array(
'label' => __( 'Heading color', 'storefront' ),
'section' => 'storefront_typography',
'settings' => 'storefront_heading_color',
'priority' => 20,
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_heading_color', array(
'label' => __( 'Heading color', 'storefront' ),
'section' => 'storefront_typography',
'settings' => 'storefront_heading_color',
'priority' => 20,
)
)
);
/**
* Text Color
*/
$wp_customize->add_setting( 'storefront_text_color', array(
'default' => apply_filters( 'storefront_default_text_color', '#43454b' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_text_color', array(
'default' => apply_filters( 'storefront_default_text_color', '#43454b' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_text_color', array(
'label' => __( 'Text color', 'storefront' ),
'section' => 'storefront_typography',
'settings' => 'storefront_text_color',
'priority' => 30,
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_text_color', array(
'label' => __( 'Text color', 'storefront' ),
'section' => 'storefront_typography',
'settings' => 'storefront_text_color',
'priority' => 30,
)
)
);
/**
* Accent Color
*/
$wp_customize->add_setting( 'storefront_accent_color', array(
'default' => apply_filters( 'storefront_default_accent_color', '#96588a' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_accent_color', array(
'default' => apply_filters( 'storefront_default_accent_color', '#96588a' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_accent_color', array(
'label' => __( 'Link / accent color', 'storefront' ),
'section' => 'storefront_typography',
'settings' => 'storefront_accent_color',
'priority' => 40,
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_accent_color', array(
'label' => __( 'Link / accent color', 'storefront' ),
'section' => 'storefront_typography',
'settings' => 'storefront_accent_color',
'priority' => 40,
)
)
);
/**
* Hero Heading Color
*/
$wp_customize->add_setting( 'storefront_hero_heading_color', array(
'default' => apply_filters( 'storefront_default_hero_heading_color', '#000000' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_hero_heading_color', array(
'default' => apply_filters( 'storefront_default_hero_heading_color', '#000000' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_hero_heading_color', array(
'label' => __( 'Hero heading color', 'storefront' ),
'section' => 'storefront_typography',
'settings' => 'storefront_hero_heading_color',
'priority' => 50,
'active_callback' => array( $this, 'is_homepage_template' ),
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_hero_heading_color', array(
'label' => __( 'Hero heading color', 'storefront' ),
'section' => 'storefront_typography',
'settings' => 'storefront_hero_heading_color',
'priority' => 50,
'active_callback' => array( $this, 'is_homepage_template' ),
)
)
);
/**
* Hero Text Color
*/
$wp_customize->add_setting( 'storefront_hero_text_color', array(
'default' => apply_filters( 'storefront_default_hero_text_color', '#000000' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_hero_text_color', array(
'default' => apply_filters( 'storefront_default_hero_text_color', '#000000' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_hero_text_color', array(
'label' => __( 'Hero text color', 'storefront' ),
'section' => 'storefront_typography',
'settings' => 'storefront_hero_text_color',
'priority' => 60,
'active_callback' => array( $this, 'is_homepage_template' ),
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_hero_text_color', array(
'label' => __( 'Hero text color', 'storefront' ),
'section' => 'storefront_typography',
'settings' => 'storefront_hero_text_color',
'priority' => 60,
'active_callback' => array( $this, 'is_homepage_template' ),
)
)
);
$wp_customize->add_control( new Arbitrary_Storefront_Control( $wp_customize, 'storefront_header_image_heading', array(
'section' => 'header_image',
'type' => 'heading',
'label' => __( 'Header background image', 'storefront' ),
'priority' => 6,
) ) );
$wp_customize->add_control(
new Arbitrary_Storefront_Control(
$wp_customize, 'storefront_header_image_heading', array(
'section' => 'header_image',
'type' => 'heading',
'label' => __( 'Header background image', 'storefront' ),
'priority' => 6,
)
)
);
/**
* Header Background
*/
$wp_customize->add_setting( 'storefront_header_background_color', array(
'default' => apply_filters( 'storefront_default_header_background_color', '#2c2d33' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_header_background_color', array(
'default' => apply_filters( 'storefront_default_header_background_color', '#2c2d33' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_header_background_color', array(
'label' => __( 'Background color', 'storefront' ),
'section' => 'header_image',
'settings' => 'storefront_header_background_color',
'priority' => 15,
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_header_background_color', array(
'label' => __( 'Background color', 'storefront' ),
'section' => 'header_image',
'settings' => 'storefront_header_background_color',
'priority' => 15,
)
)
);
/**
* Header text color
*/
$wp_customize->add_setting( 'storefront_header_text_color', array(
'default' => apply_filters( 'storefront_default_header_text_color', '#9aa0a7' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_header_text_color', array(
'default' => apply_filters( 'storefront_default_header_text_color', '#9aa0a7' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_header_text_color', array(
'label' => __( 'Text color', 'storefront' ),
'section' => 'header_image',
'settings' => 'storefront_header_text_color',
'priority' => 20,
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_header_text_color', array(
'label' => __( 'Text color', 'storefront' ),
'section' => 'header_image',
'settings' => 'storefront_header_text_color',
'priority' => 20,
)
)
);
/**
* Header link color
*/
$wp_customize->add_setting( 'storefront_header_link_color', array(
'default' => apply_filters( 'storefront_default_header_link_color', '#d5d9db' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_header_link_color', array(
'default' => apply_filters( 'storefront_default_header_link_color', '#d5d9db' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_header_link_color', array(
'label' => __( 'Link color', 'storefront' ),
'section' => 'header_image',
'settings' => 'storefront_header_link_color',
'priority' => 30,
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_header_link_color', array(
'label' => __( 'Link color', 'storefront' ),
'section' => 'header_image',
'settings' => 'storefront_header_link_color',
'priority' => 30,
)
)
);
/**
* Footer section
*/
$wp_customize->add_section( 'storefront_footer' , array(
'title' => __( 'Footer', 'storefront' ),
'priority' => 28,
'description' => __( 'Customize the look & feel of your website footer.', 'storefront' ),
) );
$wp_customize->add_section(
'storefront_footer', array(
'title' => __( 'Footer', 'storefront' ),
'priority' => 28,
'description' => __( 'Customize the look & feel of your website footer.', 'storefront' ),
)
);
/**
* Footer Background
*/
$wp_customize->add_setting( 'storefront_footer_background_color', array(
'default' => apply_filters( 'storefront_default_footer_background_color', '#f0f0f0' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_footer_background_color', array(
'default' => apply_filters( 'storefront_default_footer_background_color', '#f0f0f0' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_footer_background_color', array(
'label' => __( 'Background color', 'storefront' ),
'section' => 'storefront_footer',
'settings' => 'storefront_footer_background_color',
'priority' => 10,
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_footer_background_color', array(
'label' => __( 'Background color', 'storefront' ),
'section' => 'storefront_footer',
'settings' => 'storefront_footer_background_color',
'priority' => 10,
)
)
);
/**
* Footer heading color
*/
$wp_customize->add_setting( 'storefront_footer_heading_color', array(
'default' => apply_filters( 'storefront_default_footer_heading_color', '#494c50' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_footer_heading_color', array(
'default' => apply_filters( 'storefront_default_footer_heading_color', '#494c50' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_footer_heading_color', array(
'label' => __( 'Heading color', 'storefront' ),
'section' => 'storefront_footer',
'settings' => 'storefront_footer_heading_color',
'priority' => 20,
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_footer_heading_color', array(
'label' => __( 'Heading color', 'storefront' ),
'section' => 'storefront_footer',
'settings' => 'storefront_footer_heading_color',
'priority' => 20,
)
)
);
/**
* Footer text color
*/
$wp_customize->add_setting( 'storefront_footer_text_color', array(
'default' => apply_filters( 'storefront_default_footer_text_color', '#61656b' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_footer_text_color', array(
'default' => apply_filters( 'storefront_default_footer_text_color', '#61656b' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_footer_text_color', array(
'label' => __( 'Text color', 'storefront' ),
'section' => 'storefront_footer',
'settings' => 'storefront_footer_text_color',
'priority' => 30,
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_footer_text_color', array(
'label' => __( 'Text color', 'storefront' ),
'section' => 'storefront_footer',
'settings' => 'storefront_footer_text_color',
'priority' => 30,
)
)
);
/**
* Footer link color
*/
$wp_customize->add_setting( 'storefront_footer_link_color', array(
'default' => apply_filters( 'storefront_default_footer_link_color', '#2c2d33' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_footer_link_color', array(
'default' => apply_filters( 'storefront_default_footer_link_color', '#2c2d33' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_footer_link_color', array(
'label' => __( 'Link color', 'storefront' ),
'section' => 'storefront_footer',
'settings' => 'storefront_footer_link_color',
'priority' => 40,
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_footer_link_color', array(
'label' => __( 'Link color', 'storefront' ),
'section' => 'storefront_footer',
'settings' => 'storefront_footer_link_color',
'priority' => 40,
)
)
);
/**
* Buttons section
*/
$wp_customize->add_section( 'storefront_buttons' , array(
'title' => __( 'Buttons', 'storefront' ),
'priority' => 45,
'description' => __( 'Customize the look & feel of your website buttons.', 'storefront' ),
) );
$wp_customize->add_section(
'storefront_buttons', array(
'title' => __( 'Buttons', 'storefront' ),
'priority' => 45,
'description' => __( 'Customize the look & feel of your website buttons.', 'storefront' ),
)
);
/**
* Button background color
*/
$wp_customize->add_setting( 'storefront_button_background_color', array(
'default' => apply_filters( 'storefront_default_button_background_color', '#96588a' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_button_background_color', array(
'default' => apply_filters( 'storefront_default_button_background_color', '#96588a' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_button_background_color', array(
'label' => __( 'Background color', 'storefront' ),
'section' => 'storefront_buttons',
'settings' => 'storefront_button_background_color',
'priority' => 10,
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_button_background_color', array(
'label' => __( 'Background color', 'storefront' ),
'section' => 'storefront_buttons',
'settings' => 'storefront_button_background_color',
'priority' => 10,
)
)
);
/**
* Button text color
*/
$wp_customize->add_setting( 'storefront_button_text_color', array(
'default' => apply_filters( 'storefront_default_button_text_color', '#ffffff' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_button_text_color', array(
'default' => apply_filters( 'storefront_default_button_text_color', '#ffffff' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_button_text_color', array(
'label' => __( 'Text color', 'storefront' ),
'section' => 'storefront_buttons',
'settings' => 'storefront_button_text_color',
'priority' => 20,
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_button_text_color', array(
'label' => __( 'Text color', 'storefront' ),
'section' => 'storefront_buttons',
'settings' => 'storefront_button_text_color',
'priority' => 20,
)
)
);
/**
* Button alt background color
*/
$wp_customize->add_setting( 'storefront_button_alt_background_color', array(
'default' => apply_filters( 'storefront_default_button_alt_background_color', '#2c2d33' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_button_alt_background_color', array(
'default' => apply_filters( 'storefront_default_button_alt_background_color', '#2c2d33' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_button_alt_background_color', array(
'label' => __( 'Alternate button background color', 'storefront' ),
'section' => 'storefront_buttons',
'settings' => 'storefront_button_alt_background_color',
'priority' => 30,
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_button_alt_background_color', array(
'label' => __( 'Alternate button background color', 'storefront' ),
'section' => 'storefront_buttons',
'settings' => 'storefront_button_alt_background_color',
'priority' => 30,
)
)
);
/**
* Button alt text color
*/
$wp_customize->add_setting( 'storefront_button_alt_text_color', array(
'default' => apply_filters( 'storefront_default_button_alt_text_color', '#ffffff' ),
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_setting(
'storefront_button_alt_text_color', array(
'default' => apply_filters( 'storefront_default_button_alt_text_color', '#ffffff' ),
'sanitize_callback' => 'sanitize_hex_color',
)
);
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'storefront_button_alt_text_color', array(
'label' => __( 'Alternate button text color', 'storefront' ),
'section' => 'storefront_buttons',
'settings' => 'storefront_button_alt_text_color',
'priority' => 40,
) ) );
$wp_customize->add_control(
new WP_Customize_Color_Control(
$wp_customize, 'storefront_button_alt_text_color', array(
'label' => __( 'Alternate button text color', 'storefront' ),
'section' => 'storefront_buttons',
'settings' => 'storefront_button_alt_text_color',
'priority' => 40,
)
)
);
/**
* Layout
*/
$wp_customize->add_section( 'storefront_layout' , array(
'title' => __( 'Layout', 'storefront' ),
'priority' => 50,
) );
$wp_customize->add_section(
'storefront_layout', array(
'title' => __( 'Layout', 'storefront' ),
'priority' => 50,
)
);
$wp_customize->add_setting( 'storefront_layout', array(
'default' => apply_filters( 'storefront_default_layout', $layout = is_rtl() ? 'left' : 'right' ),
'sanitize_callback' => 'storefront_sanitize_choices',
) );
$wp_customize->add_setting(
'storefront_layout', array(
'default' => apply_filters( 'storefront_default_layout', $layout = is_rtl() ? 'left' : 'right' ),
'sanitize_callback' => 'storefront_sanitize_choices',
)
);
$wp_customize->add_control( new Storefront_Custom_Radio_Image_Control( $wp_customize, 'storefront_layout', array(
'settings' => 'storefront_layout',
'section' => 'storefront_layout',
'label' => __( 'General Layout', 'storefront' ),
'priority' => 1,
'choices' => array(
'right' => get_template_directory_uri() . '/assets/images/customizer/controls/2cr.png',
'left' => get_template_directory_uri() . '/assets/images/customizer/controls/2cl.png',
),
) ) );
$wp_customize->add_control(
new Storefront_Custom_Radio_Image_Control(
$wp_customize, 'storefront_layout', array(
'settings' => 'storefront_layout',
'section' => 'storefront_layout',
'label' => __( 'General Layout', 'storefront' ),
'priority' => 1,
'choices' => array(
'right' => get_template_directory_uri() . '/assets/images/customizer/controls/2cr.png',
'left' => get_template_directory_uri() . '/assets/images/customizer/controls/2cl.png',
),
)
)
);
/**
* More
*/
if ( apply_filters( 'storefront_customizer_more', true ) ) {
$wp_customize->add_section( 'storefront_more' , array(
'title' => __( 'More', 'storefront' ),
'priority' => 999,
) );
$wp_customize->add_section(
'storefront_more', array(
'title' => __( 'More', 'storefront' ),
'priority' => 999,
)
);
$wp_customize->add_setting( 'storefront_more', array(
'default' => null,
'sanitize_callback' => 'sanitize_text_field',
) );
$wp_customize->add_setting(
'storefront_more', array(
'default' => null,
'sanitize_callback' => 'sanitize_text_field',
)
);
$wp_customize->add_control( new More_Storefront_Control( $wp_customize, 'storefront_more', array(
'label' => __( 'Looking for more options?', 'storefront' ),
'section' => 'storefront_more',
'settings' => 'storefront_more',
'priority' => 1,
) ) );
$wp_customize->add_control(
new More_Storefront_Control(
$wp_customize, 'storefront_more', array(
'label' => __( 'Looking for more options?', 'storefront' ),
'section' => 'storefront_more',
'settings' => 'storefront_more',
'priority' => 1,
)
)
);
}
}