PluginProbe
Customify / 1.7.0
Customify v1.7.0
2.10.9 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.7.1 1.3.0 1.3.1 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.6.0 1.6.0.1 1.6.5 1.7.0 1.7.1 All 77 releases
customify / settings / general.php

general.php in Customify 1.7.0, at settings/general.php

87 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 $config = apply_filters('customify_filter_fields', array() );
4
5 $customify_sections = array();
6
7 if ( isset( $config['sections'] ) && ! empty( $config['sections'] ) ) {
8
9 foreach ( $config['sections'] as $id => $section ) {
10 $customify_sections[$id] = $section['title'];
11 }
12
13 }
14
15 if ( isset( $config['panels'] ) && ! empty( $config['panels'] ) ) {
16
17 foreach ( $config['panels'] as $panel_id => $panel ) {
18
19 if ( isset( $panel['sections'] ) && ! empty( $panel['sections'] ) ) {
20 foreach ( $panel['sections'] as $id => $section ) {
21 $customify_sections[$id] = $section['title'];
22 }
23 }
24 }
25 }
26
27 $general_settings = array(
28 'type' => 'postbox',
29 'label' => 'General Settings',
30 'options' => array(
31 'values_store_mod' => array(
32 'name' => 'values_store_mod',
33 'label' => __( 'Store values as:', 'customify' ),
34 'desc' => __( 'You can store the values globally so you can use them with other themes or store them as a "theme_mod" which will make an individual set of options only for the current theme', 'customify' ),
35 'default' => 'option',
36 'type' => 'select',
37 'options' => array(
38 'option' => __( 'Option (global options)', 'customify' ),
39 'theme_mod' => __( 'Theme Mod (per theme options)', 'customify' ),
40 ),
41 ),
42
43 'disable_default_sections' => array(
44 'name' => 'disable_default_sections',
45 'label' => __( 'Disable default sections', 'customify' ),
46 'desc' => __( 'You can disable default sections', 'customify' ),
47 'type' => 'multicheckbox',
48 'options' => array(
49 'nav' => __( 'Navigation', 'customify' ),
50 'static_front_page' => __( 'Front Page', 'customify' ),
51 'title_tagline' => __( 'Title', 'customify' ),
52 'colors' => __( 'Colors', 'customify' ),
53 'background_image' => __( 'Background', 'customify' ),
54 'header_image' => __( 'Header', 'customify' ),
55 'widgets' => __( 'Widgets', 'customify' ),
56 ),
57 ),
58
59 'enable_reset_buttons' => array(
60 'name' => 'enable_reset_buttons',
61 'label' => __( 'Enable Reset Buttons', 'customify' ),
62 'desc' => __( 'You can enable "Reset to defaults" buttons for panels / sections or all settings. We have disabled this feature by default to avoid accidental resets. If you are sure that you need it please enable this.', 'customify' ),
63 'default' => false,
64 'type' => 'switch',
65 ),
66
67 'enable_editor_style' => array(
68 'name' => 'enable_editor_style',
69 'label' => __( 'Enable Editor Style', 'customify' ),
70 'desc' => __( 'The styling added by Customify in front-end can be added in the WordPress editor too by enabling this option', 'customify' ),
71 'default' => true,
72 'type' => 'switch',
73 ),
74 )
75 ); # config
76
77 if ( !empty( $customify_sections ) ) {
78 $general_settings['options']['disable_customify_sections'] = array(
79 'name' => 'disable_customify_sections',
80 'label' => __( 'Disable Customify sections', 'customify' ),
81 'desc' => __( 'You can also disable Customify\'s sections', 'customify' ),
82 'type' => 'multicheckbox',
83 'options' => $customify_sections
84 );
85 }
86
87 return $general_settings;