PluginProbe
LoftLoader / 2.3.1
LoftLoader v2.3.1
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-more.php

customize-more.php in LoftLoader 2.3.1, at inc/configs/customize-more.php

74 lines 3.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 more section
4 *
5 * @since version 2.1.3
6 */
7 add_action( 'customize_register', 'loftloader_customize_more', 45 );
8 function loftloader_customize_more( $wp_customize ) {
9 global $loftloader_default_settings;
10
11 $wp_customize->add_panel( new WP_Customize_Panel ( $wp_customize, 'loftloader_panel_more', array(
12 'title' => esc_html__( 'More', 'loftloader' ),
13 'priority' => 52
14 ) ) );
15
16 $wp_customize->add_section( new LoftLoader_Customize_Section( $wp_customize, 'loftloader_section_max_load_time', array(
17 'title' => esc_html__( 'Maximum Load Time', 'loftloader' ),
18 'panel' => 'loftloader_panel_more'
19 ) ) );
20 $wp_customize->add_section( new LoftLoader_Customize_Section( $wp_customize, 'loftloader_section_close_button', array(
21 'title' => esc_html__( 'Close Button', 'loftloader' ),
22 'panel' => 'loftloader_panel_more'
23 ) ) );
24
25 $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_max_load_time', array(
26 'default' => $loftloader_default_settings['loftloader_max_load_time'],
27 'transport' => 'postMessage',
28 'type' => 'option',
29 'sanitize_callback' => 'loftloader_sanitize_number'
30 ) ) );
31 $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_show_close_timer', array(
32 'default' => $loftloader_default_settings['loftloader_show_close_timer'],
33 'transport' => 'postMessage',
34 'type' => 'option',
35 'sanitize_callback' => 'absint'
36 ) ) );
37 $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_show_close_tip', array(
38 'default' => $loftloader_default_settings['loftloader_show_close_tip'],
39 'transport' => 'postMessage',
40 'type' => 'option',
41 'sanitize_callback' => 'sanitize_text_field'
42 ) ) );
43
44 $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_max_load_time', array(
45 'type' => 'number',
46 'label' => esc_html__( 'Maximum Load Time', 'loftloader' ),
47 'note_below' => esc_html__( 'Please enter any number greater than 0 to enable this feature.', 'loftloader' ),
48 'section' => 'loftloader_section_max_load_time',
49 'input_attrs' => array( 'min' => '0' ),
50 'text' => esc_html__( ' second(s)', 'loftloader' ),
51 'settings' => 'loftloader_max_load_time'
52 ) ) );
53 $wp_customize->add_control( new LoftLoader_Customize_Slider_Control( $wp_customize, 'loftloader_show_close_timer', array(
54 'type' => 'slider',
55 'label' => esc_html__( 'Show Close Button after', 'loftloader' ),
56 'after_text' => 'second(s)',
57 'input_attrs' => array(
58 'data-default' => '15',
59 'data-min' => '5',
60 'data-max' => '20',
61 'data-step' => '1'
62 ),
63 'input_class' => 'loftloader-show-close-timer',
64 'section' => 'loftloader_section_close_button',
65 'settings' => 'loftloader_show_close_timer'
66 ) ) );
67 $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_show_close_tip', array(
68 'type' => 'text',
69 'label' => esc_html__( 'Description for Close Button', 'loftloader' ),
70 'section' => 'loftloader_section_close_button',
71 'settings' => 'loftloader_show_close_tip'
72 ) ) );
73 }
74