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-more.php

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

94 lines 4.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 $wp_customize->add_section( new LoftLoader_Customize_Section( $wp_customize, 'loftloader_section_remove_settings', array(
25 'title' => esc_html__( 'Plugin Data', 'loftloader' ),
26 'panel' => 'loftloader_panel_more'
27 ) ) );
28
29 $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_max_load_time', array(
30 'default' => $loftloader_default_settings['loftloader_max_load_time'],
31 'transport' => 'postMessage',
32 'type' => 'option',
33 'sanitize_callback' => 'loftloader_sanitize_number'
34 ) ) );
35 $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_show_close_timer', array(
36 'default' => $loftloader_default_settings['loftloader_show_close_timer'],
37 'transport' => 'postMessage',
38 'type' => 'option',
39 'sanitize_callback' => 'absint'
40 ) ) );
41 $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_show_close_tip', array(
42 'default' => $loftloader_default_settings['loftloader_show_close_tip'],
43 'transport' => 'postMessage',
44 'type' => 'option',
45 'sanitize_callback' => 'sanitize_text_field'
46 ) ) );
47
48 $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_remove_settings', array(
49 'default' => $loftloader_default_settings['loftloader_remove_settings'],
50 'transport' => 'postMessage',
51 'type' => 'option',
52 'sanitize_callback' => 'loftloader_sanitize_checkbox'
53 ) ) );
54
55 $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_max_load_time', array(
56 'type' => 'number',
57 'label' => esc_html__( 'Maximum Load Time', 'loftloader' ),
58 'note_below' => esc_html__( 'Please enter any number greater than 0 to enable this feature.', 'loftloader' ),
59 'section' => 'loftloader_section_max_load_time',
60 'input_attrs' => array( 'min' => '0' ),
61 'text' => esc_html__( ' second(s)', 'loftloader' ),
62 'settings' => 'loftloader_max_load_time'
63 ) ) );
64 $wp_customize->add_control( new LoftLoader_Customize_Slider_Control( $wp_customize, 'loftloader_show_close_timer', array(
65 'type' => 'slider',
66 'label' => esc_html__( 'Show Close Button after', 'loftloader' ),
67 'after_text' => 'second(s)',
68 'input_attrs' => array(
69 'data-default' => '15',
70 'data-min' => '5',
71 'data-max' => '20',
72 'data-step' => '1'
73 ),
74 'input_class' => 'loftloader-show-close-timer',
75 'section' => 'loftloader_section_close_button',
76 'settings' => 'loftloader_show_close_timer'
77 ) ) );
78 $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_show_close_tip', array(
79 'type' => 'text',
80 'label' => esc_html__( 'Description for Close Button', 'loftloader' ),
81 'section' => 'loftloader_section_close_button',
82 'settings' => 'loftloader_show_close_tip'
83 ) ) );
84
85 $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_remove_settings', array(
86 'type' => 'check',
87 'label' => esc_html__( 'Remove Plugin Data after Deactivating Plugin', 'loftloader' ),
88 'description' => esc_html__( 'If checked, all settings will be removed after deactivating this plugin.', 'loftocean' ),
89 'choices' => array( 'on' => '' ),
90 'section' => 'loftloader_section_remove_settings',
91 'settings' => 'loftloader_remove_settings'
92 ) ) );
93 }
94