global-settings.php
7.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<?php
FLBuilder::register_settings_form('global', array(
'title' => __( 'Global Settings', 'fl-builder' ),
'tabs' => array(
'general' => array(
'title' => __('General', 'fl-builder'),
'description' => __('<strong>Note</strong>: These settings apply to all posts and pages.', 'fl-builder'),
'sections' => array(
'page_heading' => array(
'title' => __('Default Page Heading', 'fl-builder'),
'fields' => array(
'show_default_heading' => array(
'type' => 'select',
'label' => _x( 'Show', 'General settings form field label. Intended meaning: "Show page heading?"', 'fl-builder' ),
'default' => '0',
'options' => array(
'0' => __('No', 'fl-builder'),
'1' => __('Yes', 'fl-builder')
),
'toggle' => array(
'0' => array(
'fields' => array('default_heading_selector')
)
),
'help' => __('Choosing no will hide the default theme heading for the "Page" post type. You will also be required to enter some basic CSS for this to work if you choose no.', 'fl-builder'),
),
'default_heading_selector' => array(
'type' => 'text',
'label' => __('CSS Selector', 'fl-builder'),
'default' => '.fl-post-header',
'help' => __('Enter a CSS selector for the default page heading to hide it.', 'fl-builder')
)
)
),
'rows' => array(
'title' => __('Rows', 'fl-builder'),
'fields' => array(
'row_margins' => array(
'type' => 'unit',
'label' => __('Margins', 'fl-builder'),
'default' => '0',
'placeholder' => '0',
'responsive' => true,
'description' => 'px'
),
'row_padding' => array(
'type' => 'unit',
'label' => __('Padding', 'fl-builder'),
'default' => '20',
'placeholder' => '0',
'responsive' => true,
'description' => 'px'
),
'row_width' => array(
'type' => 'text',
'label' => __('Max Width', 'fl-builder'),
'default' => '1100',
'maxlength' => '4',
'size' => '5',
'description' => 'px',
'help' => __('All rows will default to this width. You can override this and make a row full width in the settings for each row.', 'fl-builder')
),
'row_width_default' => array(
'type' => 'select',
'label' => __( 'Default Row Width', 'fl-builder' ),
'default' => 'fixed',
'options' => array(
'fixed' => __( 'Fixed', 'fl-builder' ),
'full' => __( 'Full Width', 'fl-builder' )
),
'toggle' => array(
'full' => array(
'fields' => array('row_content_width_default')
)
),
),
'row_content_width_default' => array(
'type' => 'select',
'label' => __( 'Default Row Content Width', 'fl-builder' ),
'default' => 'fixed',
'options' => array(
'fixed' => __( 'Fixed', 'fl-builder' ),
'full' => __( 'Full Width', 'fl-builder' )
),
)
)
),
'modules' => array(
'title' => __('Modules', 'fl-builder'),
'fields' => array(
'module_margins' => array(
'type' => 'unit',
'label' => __('Margins', 'fl-builder'),
'default' => '20',
'placeholder' => '0',
'responsive' => true,
'description' => 'px'
)
)
),
'responsive' => array(
'title' => __('Responsive Layout', 'fl-builder'),
'fields' => array(
'responsive_enabled' => array(
'type' => 'select',
'label' => _x( 'Enabled', 'General settings form field label. Intended meaning: "Responsive layout enabled?"', 'fl-builder' ),
'default' => '1',
'options' => array(
'0' => __('No', 'fl-builder'),
'1' => __('Yes', 'fl-builder')
),
'toggle' => array(
'1' => array(
'fields' => array('auto_spacing', 'responsive_breakpoint', 'medium_breakpoint')
)
)
),
'auto_spacing' => array(
'type' => 'select',
'label' => _x( 'Enable Auto Spacing', 'General settings form field label. Intended meaning: "Enable auto spacing for responsive layouts?"', 'fl-builder' ),
'default' => '1',
'options' => array(
'0' => __('No', 'fl-builder'),
'1' => __('Yes', 'fl-builder')
),
'help' => __('When auto spacing is enabled, the builder will automatically adjust the margins and padding in your layout once the small device breakpoint is reached. Most users will want to leave this enabled.', 'fl-builder')
),
'medium_breakpoint' => array(
'type' => 'text',
'label' => __('Medium Device Breakpoint', 'fl-builder'),
'default' => '992',
'maxlength' => '4',
'size' => '5',
'description' => 'px',
'help' => __('The browser width at which the layout will adjust for medium devices such as tablets.', 'fl-builder')
),
'responsive_breakpoint' => array(
'type' => 'text',
'label' => __('Small Device Breakpoint', 'fl-builder'),
'default' => '768',
'maxlength' => '4',
'size' => '5',
'description' => 'px',
'help' => __('The browser width at which the layout will adjust for small devices such as phones.', 'fl-builder')
)
)
)
)
),
'css' => array(
'title' => __('CSS', 'fl-builder'),
'sections' => array(
'css' => array(
'title' => '',
'fields' => array(
'css' => array(
'type' => 'code',
'label' => '',
'editor' => 'css',
'rows' => '19',
'preview' => array(
'type' => 'none'
)
)
)
)
)
),
'js' => array(
'title' => __('JavaScript', 'fl-builder'),
'sections' => array(
'js' => array(
'title' => '',
'fields' => array(
'js' => array(
'type' => 'code',
'label' => '',
'editor' => 'javascript',
'rows' => '19',
'preview' => array(
'type' => 'none'
)
)
)
)
)
)
)
));