PluginProbe
Customify / 2.5.6
Customify v2.5.6
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 / includes / extras.php

extras.php in Customify 2.5.6, at includes/extras.php

327 lines 9.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Extra functionality.
4 */
5
6 if ( ! function_exists('add_customify_base_options') ) {
7 /**
8 * This filter is used to change the Customizer Options
9 * You can also copy this function inside your functions.php
10 * file but DO NOT FORGET TO CHANGE ITS NAME
11 *
12 * @param $config array This holds required keys for the plugin config like 'opt-name', 'panels', 'settings'
13 * @return $config
14 */
15 function add_customify_base_options( $config ) {
16
17 $config['opt-name'] = 'customify_defaults';
18
19 $config['sections'] = array(
20 /**
21 * Presets - This section will handle other options
22 */
23 'presets_section' => array(
24 'title' => esc_html__( 'Style Presets', 'customify' ),
25 'options' => array(
26 'theme_style' => array(
27 'type' => 'preset',
28 'label' => esc_html__( 'Select a style:', 'customify' ),
29 'desc' => esc_html__( 'Conveniently change the design of your site with built-in style presets. Easy as pie.', 'customify' ),
30 'default' => 'royal',
31 'choices_type' => 'awesome',
32 'choices' => array(
33 'royal' => array(
34 'label' => esc_html__( 'Royal', 'customify' ),
35 'preview' => array(
36 'color-text' => '#ffffff',
37 'background-card' => '#615375',
38 'background-label' => '#46414c',
39 'font-main' => 'Abril Fatface',
40 'font-alt' => 'PT Serif',
41 ),
42 'options' => array(
43 'links_color' => '#8eb2c5',
44 'headings_color' => '#725c92',
45 'body_color' => '#6f8089',
46 'page_background' => '#615375',
47 'headings_font' => 'Abril Fatface',
48 'body_font' => 'PT Serif',
49 )
50 ),
51 'lovely' => array(
52 'label' => esc_html__( 'Lovely', 'customify' ),
53 'preview' => array(
54 'color-text' => '#ffffff',
55 'background-card' => '#d15c57',
56 'background-label' => '#5c374b',
57 'font-main' => 'Playfair Display',
58 'font-alt' => 'Playfair Display',
59 ),
60 'options' => array(
61 'links_color' => '#cc3747',
62 'headings_color' => '#d15c57',
63 'body_color' => '#5c374b',
64 'page_background' => '#d15c57',
65 'headings_font' => 'Playfair Display',
66 'body_font' => 'Playfair Display',
67 )
68 ),
69 'queen' => array(
70 'label' => esc_html__( 'Queen', 'customify' ),
71 'preview' => array(
72 'color-text' => '#fbedec',
73 'background-card' => '#773347',
74 'background-label' => '#41212a',
75 'font-main' => 'Cinzel Decorative',
76 'font-alt' => 'Gentium Basic',
77 ),
78 'options' => array(
79 'links_color' => '#cd8085',
80 'headings_color' => '#54323c',
81 'body_color' => '#cd8085',
82 'page_background' => '#fff',
83 'headings_font' => 'Cinzel Decorative',
84 'body_font' => 'Gentium Basic',
85 )
86 ),
87 'carrot' => array(
88 'label' => esc_html__( 'Carrot', 'customify' ),
89 'preview' => array(
90 'color-text' => '#ffffff',
91 'background-card' => '#df421d',
92 'background-label' => '#85210a',
93 'font-main' => 'Oswald',
94 'font-alt' => 'PT Sans Narrow',
95 ),
96 'options' => array(
97 'links_color' => '#df421d',
98 'headings_color' => '#df421d',
99 'body_color' => '#7e7e7e',
100 'page_background' => '#fff',
101 'headings_font' => 'Oswald',
102 'body_font' => 'PT Sans Narrow',
103 )
104 ),
105
106
107
108 'adler' => array(
109 'label' => esc_html__( 'Adler', 'customify' ),
110 'preview' => array(
111 'color-text' => '#fff',
112 'background-card' => '#0e364f',
113 'background-label' => '#000000',
114 'font-main' => 'Permanent Marker',
115 'font-alt' => 'Droid Sans Mono',
116 ),
117 'options' => array(
118 'links_color' => '#68f3c8',
119 'headings_color' => '#0e364f',
120 'body_color' => '#45525a',
121 'page_background' => '#ffffff',
122 'headings_font' => 'Permanent Marker',
123 'body_font' => 'Droid Sans Mono'
124 )
125 ),
126 'velvet' => array(
127 'label' => esc_html__( 'Velvet', 'customify' ),
128 'preview' => array(
129 'color-text' => '#ffffff',
130 'background-card' => '#282828',
131 'background-label' => '#000000',
132 'font-main' => 'Pinyon Script',
133 'font-alt' => 'Josefin Sans',
134 ),
135 'options' => array(
136 'links_color' => '#000000',
137 'headings_color' => '#000000',
138 'body_color' => '#000000',
139 'page_background' => '#000000',
140 'headings_font' => 'Pinyon Script',
141 'body_font' => 'Josefin Sans',
142 )
143 ),
144
145 )
146 ),
147 )
148 ),
149
150 /**
151 * COLORS - This section will handle different elements colors (eg. links, headings)
152 */
153 'colors_section' => array(
154 'title' => esc_html__( 'Colors', 'customify' ),
155 'options' => array(
156 'links_color' => array(
157 'type' => 'color',
158 'label' => esc_html__( 'Links Color', 'customify' ),
159 'live' => true,
160 'default' => '#6c6e70',
161 'css' => array(
162 array(
163 'property' => 'color',
164 'selector' => 'a, .entry-meta a',
165 ),
166 )
167 ),
168 'headings_color' => array(
169 'type' => 'color',
170 'label' => esc_html__( 'Headings Color', 'customify' ),
171 'live' => true,
172 'default' => '#0aa0d9',
173 'css' => array(
174 array(
175 'property' => 'color',
176 'selector' => '.site-title a, h1, h2, h3, h4, h5, h6,
177 h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
178 .widget-title,
179 a:hover, .entry-meta a:hover'
180 )
181 )
182 ),
183 'body_color' => array(
184 'type' => 'color',
185 'label' => esc_html__( 'Body Color', 'customify' ),
186 'live' => true,
187 'default' => '#2d3033',
188 'css' => array(
189 array(
190 'selector' => 'body',
191 'property' => 'color'
192 )
193 )
194 )
195 )
196 ),
197
198 /**
199 * FONTS - This section will handle different elements fonts (eg. headings, body)
200 */
201 'typography_section' => array(
202 'title' => esc_html__( 'Fonts', 'customify' ),
203 'options' => array(
204 'headings_font' => array(
205 'type' => 'typography',
206 'label' => esc_html__( 'Headings', 'customify' ),
207 'default' => 'Playfair Display',
208 'selector' => '.site-title a, h1, h2, h3, h4, h5, h6,
209 h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
210 .widget-title',
211 'font_weight' => true,
212 'subsets' => true,
213 'recommended' => array(
214 'Playfair Display',
215 'Oswald',
216 'Lato',
217 'Open Sans',
218 'Exo',
219 'PT Sans',
220 'Ubuntu',
221 'Vollkorn',
222 'Lora',
223 'Arvo',
224 'Josefin Slab',
225 'Crete Round',
226 'Kreon',
227 'Bubblegum Sans',
228 'The Girl Next Door',
229 'Pacifico',
230 'Handlee',
231 'Satify',
232 'Pompiere'
233 )
234 ),
235 'body_font' => array(
236 'type' => 'typography',
237 'label' => esc_html__( 'Body Text', 'customify' ),
238 'default' => 'Lato',
239 'selector' => 'html body',
240 'load_all_weights' => true,
241 'recommended' => array(
242 'Lato',
243 'Open Sans',
244 'PT Sans',
245 'Cabin',
246 'Gentium Book Basic',
247 'PT Serif',
248 'Droid Serif'
249 )
250 )
251 )
252 ),
253
254 /**
255 * BACKGROUNDS - This section will handle different elements colors (eg. links, headings)
256 */
257 'backgrounds_section' => array(
258 'title' => esc_html__( 'Backgrounds', 'customify' ),
259 'options' => array(
260 'page_background' => array(
261 'type' => 'color',
262 'label' => esc_html__( 'Page Background', 'customify' ),
263 'live' => true,
264 'default' => '#ffffff',
265 'css' => array(
266 array(
267 'property' => 'background',
268 'selector' => 'body, .site',
269 )
270 )
271 ),
272 )
273 ),
274 /**
275 * LAYOUTS - This section will handle different elements colors (eg. links, headings)
276 */
277 'layout_options' => array(
278 'title' => esc_html__( 'Layout', 'customify' ),
279 'options' => array(
280 'site_title_size' => array(
281 'type' => 'range',
282 'label' => esc_html__( 'Site Title Size', 'customify' ),
283 'live' => true,
284 'input_attrs' => array(
285 'min' => 24,
286 'max' => 100,
287 'step' => 1,
288 'data-preview' => true
289 ),
290 'default' => 24,
291 'css' => array(
292 array(
293 'property' => 'font-size',
294 'selector' => '.site-title',
295 'media' => 'screen and (min-width: 1000px)',
296 'unit' => 'px',
297 )
298 )
299 ),
300 'page_content_spacing' => array(
301 'type' => 'range',
302 'label' => 'Page Content Spacing',
303 'live' => true,
304 'input_attrs' => array(
305 'min' => 0,
306 'max' => 100,
307 'step' => 1,
308 ),
309 'default' => 18,
310 'css' => array(
311 array(
312 'property' => 'padding',
313 'selector' => '.site-content',
314 'media' => 'screen and (min-width: 1000px)',
315 'unit' => 'px',
316 )
317 )
318 )
319 )
320 )
321 );
322
323 return $config;
324 }
325 }
326 add_filter( 'customify_filter_fields', 'add_customify_base_options', 5, 1 );
327