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

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

66 lines 2.7 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 Any page related functions
4 *
5 * @since version 2.0.0
6 */
7 add_action( 'customize_register', 'loftloader_customize_advanced', 50 );
8 function loftloader_customize_advanced( $wp_customize ) {
9 global $loftloader_default_settings;
10
11 $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_inline_js', array(
12 'default' => $loftloader_default_settings['loftloader_inline_js'],
13 'transport' => 'refresh',
14 'type' => 'option',
15 'sanitize_callback' => 'loftloader_sanitize_choice'
16 ) ) );
17 $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_enable_any_page', array(
18 'default' => $loftloader_default_settings['loftloader_enable_any_page'],
19 'transport' => 'refresh',
20 'type' => 'option',
21 'sanitize_callback' => 'loftloader_sanitize_checkbox'
22 ) ) );
23 $wp_customize->add_setting( new WP_Customize_Setting( $wp_customize, 'loftloader_any_page_generation', array(
24 'default' => esc_html__( 'Generate', 'loftloader' ),
25 'transport' => 'postMessage',
26 'type' => 'option',
27 'sanitize_callback' => 'sanitize_text_field'
28 ) ) );
29
30 $wp_customize->add_section( new LoftLoader_Customize_Section( $wp_customize, 'loftloader_customize_advanced', array(
31 'title' => esc_html__( 'Advanced', 'loftloader' ),
32 'description' => '',
33 'priority' => 55
34 ) ) );
35
36 $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_inline_js', array(
37 'type' => 'radio',
38 'label' => esc_html__( 'How to Load LoftLoader\'s JavaScript', 'loftloader' ),
39 'description' => '',
40 'choices' => array(
41 '' => esc_html__( 'External JavaScript', 'loftloader' ),
42 'inline' => esc_html__( 'Inline JavaScript', 'loftloader' )
43 ),
44 'section' => 'loftloader_customize_advanced',
45 'settings' => 'loftloader_inline_js'
46 ) ) );
47 $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_enable_any_page', array(
48 'type' => 'check',
49 'label' => esc_html__( 'Check to enable Any Page Extension', 'loftloader' ),
50 'description' => '',
51 'choices' => array( 'on' => '' ),
52 'section' => 'loftloader_customize_advanced',
53 'settings' => 'loftloader_enable_any_page'
54 ) ) );
55 $wp_customize->add_control( new LoftLoader_Customize_Control( $wp_customize, 'loftloader_any_page_generation', array(
56 'type' => 'loftloader-any-page',
57 'label' => esc_html__( 'Generate LoftLoader Shortcode', 'loftloader' ),
58 'description' => '',
59 'section' => 'loftloader_customize_advanced',
60 'settings' => 'loftloader_any_page_generation',
61 'filter' => true,
62 'parent_setting_id' => 'loftloader_enable_any_page',
63 'show_filter' => array( 'on' )
64 ) ) );
65 }
66