PluginProbe
LoftLoader / trunk
LoftLoader vtrunk
trunk 1.0.0 1.0.1 1.0.2 2.0.0 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.3 2.3.1 2.3.2 2.3.3 All 34 releases
loftloader / inc / configs / customize-main.php

customize-main.php in LoftLoader trunk, at inc/configs/customize-main.php

31 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Load loftloader lite main switcher related functions
4 *
5 * @since version 2.0.0
6 */
7 add_action( 'customize_register', 'loftloader_customize_main', 10 );
8 function loftloader_customize_main( $wp_customize ) {
9 global $loftloader_default_settings;
10
11 $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_main_switch', array(
12 'default' => $loftloader_default_settings['loftloader_main_switch'],
13 'transport' => 'refresh',
14 'type' => 'option',
15 'sanitize_callback' => 'loftloader_sanitize_checkbox'
16 ) ) );
17
18 $wp_customize->add_section( new LoftLoader_Customize_Section( $wp_customize, 'loftloader_switch', array(
19 'title' => esc_html__('Enable LoftLoader', 'loftloader'),
20 'type' => 'loftloader_switch',
21 'priority' => 10,
22 ) ) );
23
24 $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'loftloader_main_switch', array(
25 'type' => 'checkbox',
26 'label' => esc_html__( 'Enable LoftLoader', 'loftloader' ),
27 'choices' => array('on' => ''),
28 'section' => 'loftloader_switch',
29 'settings' => 'loftloader_main_switch'
30 ) ) );
31 }