OSDN Git Service

WordPressテンプレート使用ショップデモデータ追加。
[magic3/magic3.git] / templates / shop-isle / inc / customizer / features / feature-advanced-controls.php
1 <?php
2 /**
3  * Customizer functionality for the Advanced Options section.
4  *
5  * @package WordPress
6  * @subpackage Shop Isle
7  */
8
9 /**
10  * Hook controls for Advanced Options section to Customizer.
11  */
12 function shop_isle_advanced_customize_register( $wp_customize ) {
13
14         /*  ADVANCED OPTIONS  */
15
16         $wp_customize->add_section(
17                 'shop_isle_general_section', array(
18                         'title'    => __( 'Advanced options', 'shop-isle' ),
19                         'priority' => 55,
20                 )
21         );
22
23         /* Disable preloader */
24         $wp_customize->add_setting(
25                 'shop_isle_disable_preloader', array(
26                         'sanitize_callback' => 'shop_isle_sanitize_text',
27                         'transport'         => 'postMessage',
28                 )
29         );
30
31         $wp_customize->add_control(
32                 'shop_isle_disable_preloader', array(
33                         'type'        => 'checkbox',
34                         'label'       => __( 'Disable preloader?', 'shop-isle' ),
35                         'section'     => 'shop_isle_general_section',
36                         'priority'    => 1,
37                 )
38         );
39
40         /* Body font size */
41         $wp_customize->add_setting(
42                 'shop_isle_font_size', array(
43                         'sanitize_callback' => 'shop_isle_sanitize_text',
44                         'default' => '13px',
45                 )
46         );
47
48         $wp_customize->add_control(
49                 'shop_isle_font_size',
50                 array(
51                         'type'     => 'select',
52                         'label'    => 'Select font size:',
53                         'section'  => 'shop_isle_general_section',
54                         'choices'  => array(
55                                 '12px' => '12px',
56                                 '13px' => '13px',
57                                 '14px' => '14px',
58                                 '15px' => '15px',
59                                 '16px' => '16px',
60                         ),
61                         'priority' => 2,
62                 )
63         );
64 }
65
66 add_action( 'customize_register', 'shop_isle_advanced_customize_register' );