marv 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/README.md +29 -16
- data/VERSION +1 -1
- data/layouts/bramble/functions/functions.php.erb +112 -0
- data/layouts/bramble/images/screenshot.png +0 -0
- data/layouts/bramble/includes/options.php.erb +1339 -0
- data/layouts/bramble/javascripts/admin.coffee +0 -0
- data/layouts/bramble/javascripts/admin.js +1 -0
- data/layouts/bramble/javascripts/theme.coffee +0 -0
- data/layouts/bramble/javascripts/theme.js +1 -0
- data/layouts/bramble/stylesheets/_header.scss.erb +16 -0
- data/layouts/bramble/stylesheets/style.css.scss.erb +4 -0
- data/layouts/bramble/templates/sample-template.php +25 -0
- data/layouts/default/images/screenshot.png +0 -0
- data/lib/marv/cli.rb +3 -1
- data/lib/marv/generator.rb +2 -2
- data/lib/marv/project.rb +2 -2
- data/marv.gemspec +13 -3
- metadata +13 -3
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,49 +1,62 @@
|
|
1
|
-
##
|
1
|
+
## What is Marv?
|
2
2
|
|
3
|
-
Marv is a toolkit for bootstrapping and developing WordPress themes using Sass, LESS, and CoffeeScript.
|
3
|
+
Marv is a free command-line toolkit for bootstrapping and developing WordPress themes in a tidy environment using front-end languages like Sass, LESS, and CoffeeScript.
|
4
4
|
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/marv.svg)](http://badge.fury.io/rb/marv)
|
6
6
|
|
7
|
-
-----
|
8
7
|
|
9
|
-
##
|
8
|
+
## How does it work?
|
10
9
|
|
11
|
-
|
10
|
+
Marv creates a neatly organized source folder with clean and simple scaffolding (base template files, SCSS files). The source folder is automatically compiled to your local WordPress install(s) as you save changes and work on your theme. When you are ready to distribute your theme Marv will build it to a folder of your choice or bundle the theme up into an easy to install zip package.
|
12
11
|
|
13
|
-
$ gem install marv
|
14
12
|
|
13
|
+
## Why use Marv?
|
15
14
|
|
16
|
-
|
15
|
+
Marv accelerates development by giving you access to higher-level languages like Sass, LESS, and CoffeeScript. These languages are much quicker and cleaner to code, but still compile to normal CSS and JavaScript. Marv also makes it easy to quickly bootstrap into and a more modular development environment, while still compiling "by the book" WordPress theme code.
|
17
16
|
|
18
|
-
Create your new theme project:
|
19
17
|
|
20
|
-
|
18
|
+
## Basic setup
|
19
|
+
|
20
|
+
Install Marv (requires [Ruby](http://www.ruby-lang.org/) and [RubyGems](http://rubygems.org/)):
|
21
|
+
|
22
|
+
$ gem install marv
|
21
23
|
|
22
|
-
|
24
|
+
Create your new theme project:
|
23
25
|
|
24
|
-
$
|
26
|
+
$ marv create themename
|
25
27
|
|
26
28
|
Link to your WordPress theme folder:
|
27
29
|
|
28
|
-
$ marv link /
|
30
|
+
$ marv link /wordpress/wp-content/themes/my-theme
|
29
31
|
|
30
32
|
Watch for changes and start developing!
|
31
33
|
|
34
|
+
$ cd themename
|
32
35
|
$ marv watch
|
33
36
|
|
34
|
-
Press Ctrl + Z to exit watch mode
|
37
|
+
Press Ctrl + Z to exit watch mode
|
35
38
|
|
36
39
|
Build your theme into the build_here directory:
|
37
40
|
|
38
41
|
$ marv build build_here
|
39
42
|
|
40
|
-
Package your theme as
|
43
|
+
Package your theme as themename.zip:
|
41
44
|
|
42
|
-
$ marv package
|
45
|
+
$ marv package themename
|
43
46
|
|
44
47
|
|
45
48
|
## Help
|
46
49
|
|
47
50
|
Get a little help with the Marv commands:
|
48
51
|
|
49
|
-
$ marv help
|
52
|
+
$ marv help
|
53
|
+
|
54
|
+
|
55
|
+
See the [user's manual](https://github.com/hardpixel/marv/wiki) for more information.
|
56
|
+
|
57
|
+
|
58
|
+
## Credits
|
59
|
+
|
60
|
+
Marv is based on [Forge](https://github.com/thethemefoundry/forge) by ThemeFoundry.
|
61
|
+
|
62
|
+
Scaffold Wordpress theme is based on [WP-Scaffold](https://github.com/gizburdt/wp-scaffold) by Gizburdt.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
@@ -0,0 +1,112 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
// Block direct access
|
4
|
+
if( ! defined( 'ABSPATH' ) ) exit;
|
5
|
+
|
6
|
+
/**
|
7
|
+
* Init for Bramble Child
|
8
|
+
*/
|
9
|
+
function <%= theme_id %>_init() {
|
10
|
+
|
11
|
+
// Image sizes
|
12
|
+
add_image_size( 'wide', 1600, 1200, true );
|
13
|
+
|
14
|
+
// Default settings
|
15
|
+
<%= theme_id %>_default_settings();
|
16
|
+
|
17
|
+
}
|
18
|
+
|
19
|
+
add_action( 'bramble_child_init', '<%= theme_id %>_init' );
|
20
|
+
|
21
|
+
|
22
|
+
/**
|
23
|
+
*
|
24
|
+
* Default Bramble settings
|
25
|
+
*
|
26
|
+
**/
|
27
|
+
|
28
|
+
function <%= theme_id %>_default_settings()
|
29
|
+
{
|
30
|
+
$user = get_option( 'theme_options' );
|
31
|
+
|
32
|
+
$options = array(
|
33
|
+
'full_width_content' => 'on',
|
34
|
+
'front_page_layout' => 'no-sidebar',
|
35
|
+
'blog_layout' => 'no-sidebar',
|
36
|
+
'page_layout' => 'no-sidebar',
|
37
|
+
'post_layout' => 'no-sidebar',
|
38
|
+
'show_header' => 'on',
|
39
|
+
'site_logo' => get_stylesheet_directory_uri() .'/images/logo.svg',
|
40
|
+
'show_top_menu' => 'on',
|
41
|
+
'top_menu_logo' => 'on',
|
42
|
+
'show_copyright' => 'on',
|
43
|
+
|
44
|
+
// user settings
|
45
|
+
'text_font' => isset( $user['text_font'] ) ? $user['text_font'] : 'Open Sans',
|
46
|
+
'text_font_size' => isset( $user['text_font_size'] ) ? $user['text_font_size'] : '16',
|
47
|
+
'text_font_weight' => isset( $user['text_font_weight'] ) ? $user['text_font_weight'] : '400',
|
48
|
+
'headings_font' => isset( $user['headings_font'] ) ? $user['headings_font'] : 'Ubuntu Condensed',
|
49
|
+
'headings_font_size' => isset( $user['headings_font_size'] ) ? $user['headings_font_size'] : '16,32',
|
50
|
+
'headings_font_weight' => isset( $user['headings_font_weight'] ) ? $user['headings_font_weight'] : '400',
|
51
|
+
);
|
52
|
+
|
53
|
+
update_option( 'theme_options', $options );
|
54
|
+
}
|
55
|
+
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Localize scripts
|
59
|
+
*/
|
60
|
+
function <%= theme_id %>_localize_scripts()
|
61
|
+
{
|
62
|
+
$localize = array(
|
63
|
+
'ajax_url' => admin_url('admin-ajax.php')
|
64
|
+
);
|
65
|
+
|
66
|
+
wp_localize_script( 'theme', 'localize', $localize );
|
67
|
+
}
|
68
|
+
|
69
|
+
add_action( 'wp_enqueue_scripts', '<%= theme_id %>_localize_scripts', 99 );
|
70
|
+
|
71
|
+
|
72
|
+
/**
|
73
|
+
* Enqueue admin scripts
|
74
|
+
*/
|
75
|
+
function <%= theme_id %>_enqueue_admin_scripts()
|
76
|
+
{
|
77
|
+
wp_enqueue_script( '<%= theme_id %>-admin', get_stylesheet_directory_uri() . '/javascripts/admin.js', array( 'jquery' ), '', true );
|
78
|
+
}
|
79
|
+
|
80
|
+
add_action( 'admin_enqueue_scripts', '<%= theme_id %>_enqueue_admin_scripts', 99 );
|
81
|
+
|
82
|
+
|
83
|
+
/**
|
84
|
+
* Includes
|
85
|
+
*/
|
86
|
+
|
87
|
+
include 'includes/options.php';
|
88
|
+
|
89
|
+
|
90
|
+
/**
|
91
|
+
* Theme Settings Page
|
92
|
+
*/
|
93
|
+
|
94
|
+
function <%= theme_id %>_settings_page( $pages )
|
95
|
+
{
|
96
|
+
$pages[] = array(
|
97
|
+
'page_title' => 'Theme Settings',
|
98
|
+
'menu_title' => 'Theme Settings',
|
99
|
+
'sub_menu' => 'themes.php',
|
100
|
+
'capability' => 'administrator',
|
101
|
+
'menu_slug' => 'theme-settings',
|
102
|
+
'setting' => 'theme_settings',
|
103
|
+
'icon' => 'options-general',
|
104
|
+
'save' => true,
|
105
|
+
'save_text' => __( 'Save Theme Settings', '<%= theme_id %>' ),
|
106
|
+
'default_tab' => 'Theme Settings'
|
107
|
+
);
|
108
|
+
|
109
|
+
return $pages;
|
110
|
+
}
|
111
|
+
|
112
|
+
add_filter('piklist_admin_pages', '<%= theme_id %>_settings_page');
|
Binary file
|
@@ -0,0 +1,1339 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Theme Customizer options
|
5
|
+
*/
|
6
|
+
|
7
|
+
function <%= theme_id %>_customizer_options() {
|
8
|
+
|
9
|
+
/*
|
10
|
+
* Using helper function to get default required capability
|
11
|
+
*/
|
12
|
+
$bramble_customizer_capability = bramble_customizer_capability();
|
13
|
+
|
14
|
+
$<%= theme_id %>_options = array(
|
15
|
+
|
16
|
+
/*
|
17
|
+
* Add fields to an existing Customizer section
|
18
|
+
*/
|
19
|
+
'title_tagline' => array(
|
20
|
+
'existing_section' => true,
|
21
|
+
'fields' => array(
|
22
|
+
|
23
|
+
'title_tagline_description' => array(
|
24
|
+
'control_args' => array(
|
25
|
+
'description' => __( 'Change site title and tagline to your liking.', 'bramble' ),
|
26
|
+
'type' => 'description',
|
27
|
+
'priority' => 1
|
28
|
+
)
|
29
|
+
)
|
30
|
+
|
31
|
+
)
|
32
|
+
),
|
33
|
+
|
34
|
+
/*
|
35
|
+
* Add fields to a new Customizer section
|
36
|
+
*/
|
37
|
+
|
38
|
+
'bramble_branding' => array(
|
39
|
+
|
40
|
+
'existing_section' => false,
|
41
|
+
|
42
|
+
'args' => array(
|
43
|
+
'title' => __( 'Branding', 'bramble' ),
|
44
|
+
'description' => __( 'Set your logo and other branding details.', 'bramble' ),
|
45
|
+
'priority' => 1
|
46
|
+
),
|
47
|
+
|
48
|
+
'fields' => array(
|
49
|
+
|
50
|
+
'site_logo' => array(
|
51
|
+
/*
|
52
|
+
* Setting related arguments
|
53
|
+
* Codex - http://codex.wordpress.org/Class_Reference/WP_Customize_Manager/add_setting
|
54
|
+
*/
|
55
|
+
'setting_args' => array(
|
56
|
+
'default' => get_stylesheet_directory_uri() . '/images/logo.png',
|
57
|
+
'type' => 'option',
|
58
|
+
'capability' => $bramble_customizer_capability,
|
59
|
+
'transport' => 'refresh',
|
60
|
+
),
|
61
|
+
/*
|
62
|
+
* Control related arguments
|
63
|
+
* Codex - http://codex.wordpress.org/Class_Reference/WP_Customize_Manager/add_control
|
64
|
+
*/
|
65
|
+
'control_args' => array(
|
66
|
+
'label' => __( 'Logo', 'bramble' ),
|
67
|
+
'description' => __( 'Upload your logo.', 'bramble' ),
|
68
|
+
'type' => 'image',
|
69
|
+
'priority' => 1
|
70
|
+
)
|
71
|
+
),
|
72
|
+
|
73
|
+
'site_logo_retina' => array(
|
74
|
+
|
75
|
+
'setting_args' => array(
|
76
|
+
'default' => get_stylesheet_directory_uri() . '/images/logo_x2.png',
|
77
|
+
'type' => 'option',
|
78
|
+
'capability' => $bramble_customizer_capability,
|
79
|
+
'transport' => 'refresh',
|
80
|
+
),
|
81
|
+
|
82
|
+
'control_args' => array(
|
83
|
+
'label' => __( 'Logo HDPI', 'bramble' ),
|
84
|
+
'description' => __( 'Upload your logo for high resolution screens. Image should be twice as big.', 'bramble' ),
|
85
|
+
'type' => 'image',
|
86
|
+
'priority' => 2
|
87
|
+
)
|
88
|
+
),
|
89
|
+
|
90
|
+
'site_favicon' => array(
|
91
|
+
|
92
|
+
'setting_args' => array(
|
93
|
+
'default' => get_stylesheet_directory_uri() . '/images/favicon.png',
|
94
|
+
'type' => 'option',
|
95
|
+
'capability' => $bramble_customizer_capability,
|
96
|
+
'transport' => 'refresh',
|
97
|
+
),
|
98
|
+
|
99
|
+
'control_args' => array(
|
100
|
+
'label' => __( 'Favicon', 'bramble' ),
|
101
|
+
'description' => __( 'Upload your favicon. Image must be 16x16px.', 'bramble' ),
|
102
|
+
'type' => 'image',
|
103
|
+
'priority' => 3
|
104
|
+
)
|
105
|
+
),
|
106
|
+
|
107
|
+
)
|
108
|
+
),
|
109
|
+
|
110
|
+
'bramble_layout' => array(
|
111
|
+
|
112
|
+
/*
|
113
|
+
* We're checking if this is an existing section
|
114
|
+
* or a new one that needs to be registered
|
115
|
+
*/
|
116
|
+
'existing_section' => false,
|
117
|
+
/*
|
118
|
+
* Section related arguments
|
119
|
+
* Codex - http://codex.wordpress.org/Class_Reference/WP_Customize_Manager/add_section
|
120
|
+
*/
|
121
|
+
'args' => array(
|
122
|
+
'title' => __( 'Layout', 'bramble' ),
|
123
|
+
'description' => __( 'Select the general layout for your pages, posts and homepage.', 'bramble' ),
|
124
|
+
'priority' => 2
|
125
|
+
),
|
126
|
+
|
127
|
+
/*
|
128
|
+
* This array contains all the fields that need to be
|
129
|
+
* added to this section
|
130
|
+
*/
|
131
|
+
'fields' => array(
|
132
|
+
|
133
|
+
'full_width_content' => array(
|
134
|
+
'setting_args' => array(
|
135
|
+
'default' => false,
|
136
|
+
'type' => 'option',
|
137
|
+
'capability' => $bramble_customizer_capability,
|
138
|
+
'transport' => 'refresh',
|
139
|
+
),
|
140
|
+
'control_args' => array(
|
141
|
+
'label' => __( 'Full Width Content', 'bramble' ),
|
142
|
+
'type' => 'checkbox_switch',
|
143
|
+
'disables' => array( 'content_width' ),
|
144
|
+
'priority' => 1
|
145
|
+
)
|
146
|
+
),
|
147
|
+
|
148
|
+
// Field ID
|
149
|
+
'content_width' => array(
|
150
|
+
/*
|
151
|
+
* Setting related arguments
|
152
|
+
* Codex - http://codex.wordpress.org/Class_Reference/WP_Customize_Manager/add_setting
|
153
|
+
*/
|
154
|
+
'setting_args' => array(
|
155
|
+
'default' => '1280',
|
156
|
+
'type' => 'option',
|
157
|
+
'capability' => $bramble_customizer_capability,
|
158
|
+
'transport' => 'refresh',
|
159
|
+
),
|
160
|
+
/*
|
161
|
+
* Control related arguments
|
162
|
+
* Codex - http://codex.wordpress.org/Class_Reference/WP_Customize_Manager/add_control
|
163
|
+
*/
|
164
|
+
'control_args' => array(
|
165
|
+
'label' => __( 'Page width', 'bramble' ),
|
166
|
+
'description' => __( 'Set the maximum page width in pixels.', 'bramble' ),
|
167
|
+
'type' => 'range_slider',
|
168
|
+
'range' => 'min',
|
169
|
+
'min' => '960',
|
170
|
+
'max' => '1440',
|
171
|
+
'step' => '10',
|
172
|
+
'unit_label' => __( 'Size', 'bramble' ),
|
173
|
+
'unit' => 'px',
|
174
|
+
'priority' => 2
|
175
|
+
)
|
176
|
+
),
|
177
|
+
|
178
|
+
'front_page_layout' => array(
|
179
|
+
|
180
|
+
'setting_args' => array(
|
181
|
+
'default' => 'no-sidebar',
|
182
|
+
'type' => 'option',
|
183
|
+
'capability' => $bramble_customizer_capability,
|
184
|
+
'transport' => 'refresh',
|
185
|
+
),
|
186
|
+
'control_args' => array(
|
187
|
+
'label' => __( 'Front Page', 'bramble' ),
|
188
|
+
'description' => __( 'Choose a layout for your homepage.', 'bramble' ),
|
189
|
+
'type' => 'images_radio',
|
190
|
+
'choices' => array(
|
191
|
+
'no-sidebar' => array(
|
192
|
+
'label' => __( 'No sidebar', 'bramble' ),
|
193
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/no-sidebar.png'
|
194
|
+
),
|
195
|
+
'sidebar-r' => array(
|
196
|
+
'label' => __( 'Sidebar right', 'bramble' ),
|
197
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-r.png'
|
198
|
+
),
|
199
|
+
'sidebar-l' => array(
|
200
|
+
'label' => __( 'Sidebar left', 'bramble' ),
|
201
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-l.png'
|
202
|
+
),
|
203
|
+
'sidebar-rl' => array(
|
204
|
+
'label' => __( 'Sidebar right left', 'bramble' ),
|
205
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-rl.png'
|
206
|
+
),
|
207
|
+
'sidebar-rr' => array(
|
208
|
+
'label' => __( 'Sidebar right right', 'bramble' ),
|
209
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-rr.png'
|
210
|
+
),
|
211
|
+
'sidebar-ll' => array(
|
212
|
+
'label' => __( 'Sidebar left left', 'bramble' ),
|
213
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-ll.png'
|
214
|
+
),
|
215
|
+
),
|
216
|
+
'priority' => 3
|
217
|
+
)
|
218
|
+
),
|
219
|
+
|
220
|
+
'blog_layout' => array(
|
221
|
+
|
222
|
+
'setting_args' => array(
|
223
|
+
'default' => 'sidebar-r',
|
224
|
+
'type' => 'option',
|
225
|
+
'capability' => $bramble_customizer_capability,
|
226
|
+
'transport' => 'refresh',
|
227
|
+
),
|
228
|
+
'control_args' => array(
|
229
|
+
'label' => __( 'Blog', 'bramble' ),
|
230
|
+
'description' => __( 'Choose a layout for your blog page.', 'bramble' ),
|
231
|
+
'type' => 'images_radio',
|
232
|
+
'choices' => array(
|
233
|
+
'no-sidebar' => array(
|
234
|
+
'label' => __( 'No sidebar', 'bramble' ),
|
235
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/no-sidebar.png'
|
236
|
+
),
|
237
|
+
'sidebar-r' => array(
|
238
|
+
'label' => __( 'Sidebar right', 'bramble' ),
|
239
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-r.png'
|
240
|
+
),
|
241
|
+
'sidebar-l' => array(
|
242
|
+
'label' => __( 'Sidebar left', 'bramble' ),
|
243
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-l.png'
|
244
|
+
),
|
245
|
+
'sidebar-rl' => array(
|
246
|
+
'label' => __( 'Sidebar right left', 'bramble' ),
|
247
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-rl.png'
|
248
|
+
),
|
249
|
+
'sidebar-rr' => array(
|
250
|
+
'label' => __( 'Sidebar right right', 'bramble' ),
|
251
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-rr.png'
|
252
|
+
),
|
253
|
+
'sidebar-ll' => array(
|
254
|
+
'label' => __( 'Sidebar left left', 'bramble' ),
|
255
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-ll.png'
|
256
|
+
),
|
257
|
+
),
|
258
|
+
'priority' => 4
|
259
|
+
)
|
260
|
+
),
|
261
|
+
|
262
|
+
'page_layout' => array(
|
263
|
+
|
264
|
+
'setting_args' => array(
|
265
|
+
'default' => 'sidebar-r',
|
266
|
+
'type' => 'option',
|
267
|
+
'capability' => $bramble_customizer_capability,
|
268
|
+
'transport' => 'refresh',
|
269
|
+
),
|
270
|
+
'control_args' => array(
|
271
|
+
'label' => __( 'Page', 'bramble' ),
|
272
|
+
'type' => 'images_radio',
|
273
|
+
'choices' => array(
|
274
|
+
'no-sidebar' => array(
|
275
|
+
'label' => __( 'No sidebar', 'bramble' ),
|
276
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/no-sidebar.png'
|
277
|
+
),
|
278
|
+
'sidebar-r' => array(
|
279
|
+
'label' => __( 'Sidebar right', 'bramble' ),
|
280
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-r.png'
|
281
|
+
),
|
282
|
+
'sidebar-l' => array(
|
283
|
+
'label' => __( 'Sidebar left', 'bramble' ),
|
284
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-l.png'
|
285
|
+
),
|
286
|
+
'sidebar-rl' => array(
|
287
|
+
'label' => __( 'Sidebar right left', 'bramble' ),
|
288
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-rl.png'
|
289
|
+
),
|
290
|
+
'sidebar-rr' => array(
|
291
|
+
'label' => __( 'Sidebar right right', 'bramble' ),
|
292
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-rr.png'
|
293
|
+
),
|
294
|
+
'sidebar-ll' => array(
|
295
|
+
'label' => __( 'Sidebar left left', 'bramble' ),
|
296
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-ll.png'
|
297
|
+
),
|
298
|
+
),
|
299
|
+
'priority' => 5
|
300
|
+
)
|
301
|
+
),
|
302
|
+
|
303
|
+
'post_layout' => array(
|
304
|
+
|
305
|
+
'setting_args' => array(
|
306
|
+
'default' => 'sidebar-r',
|
307
|
+
'type' => 'option',
|
308
|
+
'capability' => $bramble_customizer_capability,
|
309
|
+
'transport' => 'refresh',
|
310
|
+
),
|
311
|
+
'control_args' => array(
|
312
|
+
'label' => __( 'Post', 'bramble' ),
|
313
|
+
'type' => 'images_radio',
|
314
|
+
'choices' => array(
|
315
|
+
'no-sidebar' => array(
|
316
|
+
'label' => __( 'No sidebar', 'bramble' ),
|
317
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/no-sidebar.png'
|
318
|
+
),
|
319
|
+
'sidebar-r' => array(
|
320
|
+
'label' => __( 'Sidebar right', 'bramble' ),
|
321
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-r.png'
|
322
|
+
),
|
323
|
+
'sidebar-l' => array(
|
324
|
+
'label' => __( 'Sidebar left', 'bramble' ),
|
325
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-l.png'
|
326
|
+
),
|
327
|
+
'sidebar-rl' => array(
|
328
|
+
'label' => __( 'Sidebar right left', 'bramble' ),
|
329
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-rl.png'
|
330
|
+
),
|
331
|
+
'sidebar-rr' => array(
|
332
|
+
'label' => __( 'Sidebar right right', 'bramble' ),
|
333
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-rr.png'
|
334
|
+
),
|
335
|
+
'sidebar-ll' => array(
|
336
|
+
'label' => __( 'Sidebar left left', 'bramble' ),
|
337
|
+
'image_src' => bramble_customizer_directory_uri() . '/images/sidebar-ll.png'
|
338
|
+
),
|
339
|
+
),
|
340
|
+
'priority' => 6
|
341
|
+
)
|
342
|
+
),
|
343
|
+
)
|
344
|
+
),
|
345
|
+
|
346
|
+
'bramble_typography' => array(
|
347
|
+
|
348
|
+
'existing_section' => false,
|
349
|
+
|
350
|
+
'args' => array(
|
351
|
+
'title' => __( 'Typography', 'bramble' ),
|
352
|
+
'description' => __( 'Set general preferences for fonts.', 'bramble' ),
|
353
|
+
'priority' => 3
|
354
|
+
),
|
355
|
+
|
356
|
+
'fields' => array(
|
357
|
+
|
358
|
+
'text_font' => array(
|
359
|
+
|
360
|
+
'setting_args' => array(
|
361
|
+
'default' => 'Ubuntu',
|
362
|
+
'type' => 'option',
|
363
|
+
'capability' => $bramble_customizer_capability,
|
364
|
+
'transport' => 'refresh',
|
365
|
+
),
|
366
|
+
'control_args' => array(
|
367
|
+
'label' => __( 'Text', 'bramble' ),
|
368
|
+
'description' => __( 'Font for text.', 'bramble' ),
|
369
|
+
'type' => 'font_picker',
|
370
|
+
'priority' => 1
|
371
|
+
)
|
372
|
+
),
|
373
|
+
|
374
|
+
'text_font_size' => array(
|
375
|
+
|
376
|
+
'setting_args' => array(
|
377
|
+
'default' => '16',
|
378
|
+
'type' => 'option',
|
379
|
+
'capability' => $bramble_customizer_capability,
|
380
|
+
'transport' => 'refresh',
|
381
|
+
),
|
382
|
+
'control_args' => array(
|
383
|
+
'label' => __( 'Text font size', 'bramble' ),
|
384
|
+
'description' => __( 'Font size for text in pixels.', 'bramble' ),
|
385
|
+
'type' => 'range_slider',
|
386
|
+
'range' => 'min',
|
387
|
+
'min' => '10',
|
388
|
+
'max' => '24',
|
389
|
+
'step' => '1',
|
390
|
+
'unit_label' => __( 'Size', 'bramble' ),
|
391
|
+
'unit' => 'px',
|
392
|
+
'priority' => 2
|
393
|
+
)
|
394
|
+
),
|
395
|
+
|
396
|
+
'text_font_weight' => array(
|
397
|
+
|
398
|
+
'setting_args' => array(
|
399
|
+
'default' => '400',
|
400
|
+
'type' => 'option',
|
401
|
+
'capability' => $bramble_customizer_capability,
|
402
|
+
'transport' => 'refresh',
|
403
|
+
),
|
404
|
+
'control_args' => array(
|
405
|
+
'label' => __( 'Text font weight', 'bramble' ),
|
406
|
+
'description' => __( 'Font weight for paragraphs.', 'bramble' ),
|
407
|
+
'type' => 'radio_switch',
|
408
|
+
'choices' => array(
|
409
|
+
'300' => array(
|
410
|
+
'label' => __( 'Lighter', 'bramble' )
|
411
|
+
),
|
412
|
+
'400' => array(
|
413
|
+
'label' => __( 'Normal', 'bramble' )
|
414
|
+
)
|
415
|
+
),
|
416
|
+
'priority' => 3
|
417
|
+
)
|
418
|
+
),
|
419
|
+
|
420
|
+
'headings_font' => array(
|
421
|
+
|
422
|
+
'setting_args' => array(
|
423
|
+
'default' => 'Ubuntu',
|
424
|
+
'type' => 'option',
|
425
|
+
'capability' => $bramble_customizer_capability,
|
426
|
+
'transport' => 'refresh',
|
427
|
+
),
|
428
|
+
'control_args' => array(
|
429
|
+
'label' => __( 'Headings', 'bramble' ),
|
430
|
+
'description' => __( 'Font for headings.', 'bramble' ),
|
431
|
+
'type' => 'font_picker',
|
432
|
+
'priority' => 4
|
433
|
+
)
|
434
|
+
),
|
435
|
+
|
436
|
+
'headings_font_size' => array(
|
437
|
+
|
438
|
+
'setting_args' => array(
|
439
|
+
'default' => '16,32',
|
440
|
+
'type' => 'option',
|
441
|
+
'capability' => $bramble_customizer_capability,
|
442
|
+
'transport' => 'refresh',
|
443
|
+
),
|
444
|
+
'control_args' => array(
|
445
|
+
'label' => __( 'Headings font size', 'bramble' ),
|
446
|
+
'description' => __( 'Set the preffered sizes for all headings. Minimum applies to h6 and maximum to h1. Sizes in between will be calculated automagically.', 'bramble' ),
|
447
|
+
'type' => 'range_slider',
|
448
|
+
'range' => 'true',
|
449
|
+
'min' => '14',
|
450
|
+
'max' => '48',
|
451
|
+
'step' => '2',
|
452
|
+
'unit' => 'px',
|
453
|
+
'priority' => 5
|
454
|
+
)
|
455
|
+
),
|
456
|
+
|
457
|
+
'headings_font_weight' => array(
|
458
|
+
|
459
|
+
'setting_args' => array(
|
460
|
+
'default' => '400',
|
461
|
+
'type' => 'option',
|
462
|
+
'capability' => $bramble_customizer_capability,
|
463
|
+
'transport' => 'refresh',
|
464
|
+
),
|
465
|
+
'control_args' => array(
|
466
|
+
'label' => __( 'Headings font weight', 'bramble' ),
|
467
|
+
'description' => __( 'Font weight for headings.', 'bramble' ),
|
468
|
+
'type' => 'radio_switch',
|
469
|
+
'choices' => array(
|
470
|
+
'300' => array(
|
471
|
+
'label' => __( 'Lighter', 'bramble' )
|
472
|
+
),
|
473
|
+
'400' => array(
|
474
|
+
'label' => __( 'Normal', 'bramble' )
|
475
|
+
),
|
476
|
+
'600' => array(
|
477
|
+
'label' => __( 'Bold', 'bramble' )
|
478
|
+
)
|
479
|
+
),
|
480
|
+
'priority' => 7
|
481
|
+
)
|
482
|
+
),
|
483
|
+
|
484
|
+
)
|
485
|
+
),
|
486
|
+
|
487
|
+
'bramble_header' => array(
|
488
|
+
|
489
|
+
'existing_section' => false,
|
490
|
+
|
491
|
+
'args' => array(
|
492
|
+
'title' => __( 'Header', 'bramble' ),
|
493
|
+
'description' => __( 'Activate and customize the page header.', 'bramble' ),
|
494
|
+
'priority' => 4
|
495
|
+
),
|
496
|
+
|
497
|
+
'fields' => array(
|
498
|
+
|
499
|
+
'show_header' => array(
|
500
|
+
'setting_args' => array(
|
501
|
+
'default' => true,
|
502
|
+
'type' => 'option',
|
503
|
+
'capability' => $bramble_customizer_capability,
|
504
|
+
'transport' => 'refresh',
|
505
|
+
),
|
506
|
+
'control_args' => array(
|
507
|
+
'label' => __( 'Show Header', 'bramble' ),
|
508
|
+
'type' => 'checkbox_switch',
|
509
|
+
'enables' => array( 'show_logo', 'show_title', 'show_tagline', 'show_search', 'custom_header_image', 'header_image_size', 'header_background', 'header_color' ),
|
510
|
+
'priority' => 1
|
511
|
+
)
|
512
|
+
),
|
513
|
+
|
514
|
+
'show_logo' => array(
|
515
|
+
'setting_args' => array(
|
516
|
+
'default' => true,
|
517
|
+
'type' => 'option',
|
518
|
+
'capability' => $bramble_customizer_capability,
|
519
|
+
'transport' => 'refresh',
|
520
|
+
),
|
521
|
+
'control_args' => array(
|
522
|
+
'label' => __( 'Show Logo', 'bramble' ),
|
523
|
+
'type' => 'checkbox_switch',
|
524
|
+
'priority' => 2
|
525
|
+
)
|
526
|
+
),
|
527
|
+
|
528
|
+
'show_title' => array(
|
529
|
+
'setting_args' => array(
|
530
|
+
'default' => true,
|
531
|
+
'type' => 'option',
|
532
|
+
'capability' => $bramble_customizer_capability,
|
533
|
+
'transport' => 'refresh',
|
534
|
+
),
|
535
|
+
'control_args' => array(
|
536
|
+
'label' => __( 'Show Title', 'bramble' ),
|
537
|
+
'type' => 'checkbox_switch',
|
538
|
+
'priority' => 3
|
539
|
+
)
|
540
|
+
),
|
541
|
+
|
542
|
+
'show_tagline' => array(
|
543
|
+
'setting_args' => array(
|
544
|
+
'default' => true,
|
545
|
+
'type' => 'option',
|
546
|
+
'capability' => $bramble_customizer_capability,
|
547
|
+
'transport' => 'refresh',
|
548
|
+
),
|
549
|
+
'control_args' => array(
|
550
|
+
'label' => __( 'Show Tagline', 'bramble' ),
|
551
|
+
'type' => 'checkbox_switch',
|
552
|
+
'priority' => 4
|
553
|
+
)
|
554
|
+
),
|
555
|
+
|
556
|
+
'show_search' => array(
|
557
|
+
'setting_args' => array(
|
558
|
+
'default' => true,
|
559
|
+
'type' => 'option',
|
560
|
+
'capability' => $bramble_customizer_capability,
|
561
|
+
'transport' => 'refresh',
|
562
|
+
),
|
563
|
+
'control_args' => array(
|
564
|
+
'label' => __( 'Show Search', 'bramble' ),
|
565
|
+
'type' => 'checkbox_switch',
|
566
|
+
'priority' => 5
|
567
|
+
)
|
568
|
+
),
|
569
|
+
|
570
|
+
)
|
571
|
+
),
|
572
|
+
|
573
|
+
'bramble_navigation' => array(
|
574
|
+
|
575
|
+
'existing_section' => false,
|
576
|
+
|
577
|
+
'args' => array(
|
578
|
+
'title' => __( 'Navigation', 'bramble' ),
|
579
|
+
'description' => __( 'Activate menus and set your navigation preferences.', 'bramble' ),
|
580
|
+
'priority' => 5
|
581
|
+
),
|
582
|
+
|
583
|
+
'fields' => array(
|
584
|
+
|
585
|
+
'show_top_menu' => array(
|
586
|
+
'setting_args' => array(
|
587
|
+
'default' => true,
|
588
|
+
'type' => 'option',
|
589
|
+
'capability' => $bramble_customizer_capability,
|
590
|
+
'transport' => 'refresh',
|
591
|
+
),
|
592
|
+
'control_args' => array(
|
593
|
+
'label' => __( 'Top menu', 'bramble' ),
|
594
|
+
'type' => 'checkbox_switch',
|
595
|
+
'enables' => array( 'top_menu_logo', 'top_menu_title', 'top_menu_background', 'top_menu_color' ),
|
596
|
+
'priority' => 1
|
597
|
+
)
|
598
|
+
),
|
599
|
+
|
600
|
+
'top_menu_logo' => array(
|
601
|
+
'setting_args' => array(
|
602
|
+
'default' => true,
|
603
|
+
'type' => 'option',
|
604
|
+
'capability' => $bramble_customizer_capability,
|
605
|
+
'transport' => 'refresh',
|
606
|
+
),
|
607
|
+
'control_args' => array(
|
608
|
+
'label' => __( 'Top menu logo', 'bramble' ),
|
609
|
+
'type' => 'checkbox_switch',
|
610
|
+
'priority' => 2
|
611
|
+
)
|
612
|
+
),
|
613
|
+
|
614
|
+
'top_menu_title' => array(
|
615
|
+
'setting_args' => array(
|
616
|
+
'default' => true,
|
617
|
+
'type' => 'option',
|
618
|
+
'capability' => $bramble_customizer_capability,
|
619
|
+
'transport' => 'refresh',
|
620
|
+
),
|
621
|
+
'control_args' => array(
|
622
|
+
'label' => __( 'Top menu title', 'bramble' ),
|
623
|
+
'type' => 'checkbox_switch',
|
624
|
+
'priority' => 3
|
625
|
+
)
|
626
|
+
),
|
627
|
+
|
628
|
+
'show_main_menu' => array(
|
629
|
+
'setting_args' => array(
|
630
|
+
'default' => true,
|
631
|
+
'type' => 'option',
|
632
|
+
'capability' => $bramble_customizer_capability,
|
633
|
+
'transport' => 'refresh',
|
634
|
+
),
|
635
|
+
'control_args' => array(
|
636
|
+
'label' => __( 'Show main menu', 'bramble' ),
|
637
|
+
'type' => 'checkbox_switch',
|
638
|
+
'enables' => array( 'main_menu_background', 'main_menu_color' ),
|
639
|
+
'priority' => 4
|
640
|
+
)
|
641
|
+
),
|
642
|
+
|
643
|
+
'show_footer_menu' => array(
|
644
|
+
'setting_args' => array(
|
645
|
+
'default' => true,
|
646
|
+
'type' => 'option',
|
647
|
+
'capability' => $bramble_customizer_capability,
|
648
|
+
'transport' => 'refresh',
|
649
|
+
),
|
650
|
+
'control_args' => array(
|
651
|
+
'label' => __( 'Show footer menu', 'bramble' ),
|
652
|
+
'type' => 'checkbox_switch',
|
653
|
+
'enables' => array( 'footer_menu_background', 'footer_menu_color' ),
|
654
|
+
'priority' => 6
|
655
|
+
)
|
656
|
+
),
|
657
|
+
|
658
|
+
)
|
659
|
+
),
|
660
|
+
|
661
|
+
'bramble_slider' => array(
|
662
|
+
|
663
|
+
'existing_section' => false,
|
664
|
+
|
665
|
+
'args' => array(
|
666
|
+
'title' => __( 'Slider', 'bramble' ),
|
667
|
+
'description' => __( 'Customize slider.', 'bramble' ),
|
668
|
+
'priority' => 6
|
669
|
+
),
|
670
|
+
|
671
|
+
'fields' => array(
|
672
|
+
|
673
|
+
'show_slider' => array(
|
674
|
+
'setting_args' => array(
|
675
|
+
'default' => true,
|
676
|
+
'type' => 'option',
|
677
|
+
'capability' => $bramble_customizer_capability,
|
678
|
+
'transport' => 'refresh',
|
679
|
+
),
|
680
|
+
'control_args' => array(
|
681
|
+
'label' => __( 'Show slider', 'bramble' ),
|
682
|
+
'type' => 'checkbox_switch',
|
683
|
+
'enables' => array( 'home_slider', 'get_slides_from', 'slider_mode', 'slider_speed', 'slider_animation_duration', 'slider_bullets', 'slider_arrows', 'slider_thumbnails', 'slider_theme' ),
|
684
|
+
'priority' => 1
|
685
|
+
)
|
686
|
+
),
|
687
|
+
|
688
|
+
'home_slider' => array(
|
689
|
+
'setting_args' => array(
|
690
|
+
'default' => true,
|
691
|
+
'type' => 'option',
|
692
|
+
'capability' => $bramble_customizer_capability,
|
693
|
+
'transport' => 'refresh',
|
694
|
+
),
|
695
|
+
'control_args' => array(
|
696
|
+
'label' => __( 'Show slider on homepage only', 'bramble' ),
|
697
|
+
'type' => 'checkbox_switch',
|
698
|
+
'priority' => 2
|
699
|
+
)
|
700
|
+
),
|
701
|
+
|
702
|
+
'get_slides_from' => array(
|
703
|
+
'setting_args' => array(
|
704
|
+
'default' => 'post',
|
705
|
+
'type' => 'option',
|
706
|
+
'capability' => $bramble_customizer_capability,
|
707
|
+
'transport' => 'refresh',
|
708
|
+
),
|
709
|
+
'control_args' => array(
|
710
|
+
'label' => __( 'Get slides from', 'bramble' ),
|
711
|
+
'type' => 'multi_select',
|
712
|
+
'description' => __( 'Select slides type', 'bramble' ),
|
713
|
+
// 'choices' => get_post_types( array( 'publicly_queryable' => true, 'capability_type' => 'post' ) ),
|
714
|
+
'priority' => 3
|
715
|
+
)
|
716
|
+
),
|
717
|
+
|
718
|
+
'slider_mode' => array(
|
719
|
+
'setting_args' => array(
|
720
|
+
'default' => 'normal',
|
721
|
+
'type' => 'option',
|
722
|
+
'capability' => $bramble_customizer_capability,
|
723
|
+
'transport' => 'refresh',
|
724
|
+
),
|
725
|
+
'control_args' => array(
|
726
|
+
'label' => __( 'Position', 'bramble' ),
|
727
|
+
'type' => 'radio_switch',
|
728
|
+
'choices' => array(
|
729
|
+
'normal' => array(
|
730
|
+
'label' => __( 'Normal', 'bramble' )
|
731
|
+
),
|
732
|
+
'background' => array(
|
733
|
+
'label' => __( 'Background', 'bramble' )
|
734
|
+
)
|
735
|
+
),
|
736
|
+
'priority' => 4
|
737
|
+
)
|
738
|
+
),
|
739
|
+
|
740
|
+
'slider_speed' => array(
|
741
|
+
'setting_args' => array(
|
742
|
+
'default' => '5',
|
743
|
+
'type' => 'option',
|
744
|
+
'capability' => $bramble_customizer_capability,
|
745
|
+
'transport' => 'refresh',
|
746
|
+
),
|
747
|
+
'control_args' => array(
|
748
|
+
'label' => __( 'Animation speed', 'bramble' ),
|
749
|
+
'description' => __( 'Set time between each slide in seconds.', 'bramble' ),
|
750
|
+
'type' => 'range_slider',
|
751
|
+
'range' => 'min',
|
752
|
+
'min' => '1',
|
753
|
+
'max' => '10',
|
754
|
+
'step' => '0.5',
|
755
|
+
'unit_label' => __( 'Speed', 'bramble' ),
|
756
|
+
'unit' => 's',
|
757
|
+
'priority' => 6
|
758
|
+
)
|
759
|
+
),
|
760
|
+
|
761
|
+
'slider_animation_duration' => array(
|
762
|
+
|
763
|
+
'setting_args' => array(
|
764
|
+
'default' => '0.5',
|
765
|
+
'type' => 'option',
|
766
|
+
'capability' => $bramble_customizer_capability,
|
767
|
+
'transport' => 'refresh',
|
768
|
+
),
|
769
|
+
'control_args' => array(
|
770
|
+
'label' => __( 'Animation duration', 'bramble' ),
|
771
|
+
'description' => __( 'Set animation duration in seconds.', 'bramble' ),
|
772
|
+
'type' => 'range_slider',
|
773
|
+
'range' => 'min',
|
774
|
+
'min' => '0.1',
|
775
|
+
'max' => '2',
|
776
|
+
'step' => '0.1',
|
777
|
+
'unit_label' => __( 'Duration', 'bramble' ),
|
778
|
+
'unit' => 's',
|
779
|
+
'priority' => 7
|
780
|
+
)
|
781
|
+
),
|
782
|
+
|
783
|
+
'slider_bullets' => array(
|
784
|
+
'setting_args' => array(
|
785
|
+
'default' => true,
|
786
|
+
'type' => 'option',
|
787
|
+
'capability' => $bramble_customizer_capability,
|
788
|
+
'transport' => 'refresh',
|
789
|
+
),
|
790
|
+
'control_args' => array(
|
791
|
+
'label' => __( 'Show navigation bullets', 'bramble' ),
|
792
|
+
'type' => 'checkbox_switch',
|
793
|
+
'priority' => 8
|
794
|
+
)
|
795
|
+
),
|
796
|
+
|
797
|
+
'slider_arrows' => array(
|
798
|
+
'setting_args' => array(
|
799
|
+
'default' => false,
|
800
|
+
'type' => 'option',
|
801
|
+
'capability' => $bramble_customizer_capability,
|
802
|
+
'transport' => 'refresh',
|
803
|
+
),
|
804
|
+
'control_args' => array(
|
805
|
+
'label' => __( 'Show navigation arrows', 'bramble' ),
|
806
|
+
'type' => 'checkbox_switch',
|
807
|
+
'priority' => 9
|
808
|
+
)
|
809
|
+
),
|
810
|
+
|
811
|
+
'slider_thumbnails' => array(
|
812
|
+
'setting_args' => array(
|
813
|
+
'default' => false,
|
814
|
+
'type' => 'option',
|
815
|
+
'capability' => $bramble_customizer_capability,
|
816
|
+
'transport' => 'refresh',
|
817
|
+
),
|
818
|
+
'control_args' => array(
|
819
|
+
'label' => __( 'Show navigation thumbnails', 'bramble' ),
|
820
|
+
'type' => 'checkbox_switch',
|
821
|
+
'priority' => 10
|
822
|
+
)
|
823
|
+
),
|
824
|
+
|
825
|
+
'slider_theme' => array(
|
826
|
+
|
827
|
+
'setting_args' => array(
|
828
|
+
'default' => 'basic_slider',
|
829
|
+
'type' => 'option',
|
830
|
+
'capability' => $bramble_customizer_capability,
|
831
|
+
'transport' => 'refresh',
|
832
|
+
),
|
833
|
+
'control_args' => array(
|
834
|
+
'label' => __( 'Theme', 'bramble' ),
|
835
|
+
'type' => 'slider_theme_picker',
|
836
|
+
'priority' => 11
|
837
|
+
)
|
838
|
+
),
|
839
|
+
)
|
840
|
+
),
|
841
|
+
|
842
|
+
'bramble_footer' => array(
|
843
|
+
|
844
|
+
'existing_section' => false,
|
845
|
+
|
846
|
+
'args' => array(
|
847
|
+
'title' => __( 'Footer', 'bramble' ),
|
848
|
+
'description' => __( 'Set general preferences for footer.', 'bramble' ),
|
849
|
+
'priority' => 7
|
850
|
+
),
|
851
|
+
|
852
|
+
'fields' => array(
|
853
|
+
|
854
|
+
'show_widgets' => array(
|
855
|
+
'setting_args' => array(
|
856
|
+
'default' => true,
|
857
|
+
'type' => 'option',
|
858
|
+
'capability' => $bramble_customizer_capability,
|
859
|
+
'transport' => 'refresh',
|
860
|
+
),
|
861
|
+
'control_args' => array(
|
862
|
+
'label' => __( 'Show widgets in footer area.', 'bramble' ),
|
863
|
+
'type' => 'checkbox_switch',
|
864
|
+
'enables' => array( 'footer_background', 'footer_color', 'footer_headings_color' ),
|
865
|
+
'priority' => 1
|
866
|
+
)
|
867
|
+
),
|
868
|
+
|
869
|
+
'show_copyright' => array(
|
870
|
+
'setting_args' => array(
|
871
|
+
'default' => true,
|
872
|
+
'type' => 'option',
|
873
|
+
'capability' => $bramble_customizer_capability,
|
874
|
+
'transport' => 'refresh',
|
875
|
+
),
|
876
|
+
'control_args' => array(
|
877
|
+
'label' => __( 'Show copyright.', 'bramble' ),
|
878
|
+
'type' => 'checkbox_switch',
|
879
|
+
'enables' => array( 'show_powered_by', 'credits_background', 'credits_color' ),
|
880
|
+
'priority' => 2
|
881
|
+
)
|
882
|
+
),
|
883
|
+
)
|
884
|
+
|
885
|
+
),
|
886
|
+
|
887
|
+
'bramble_colors' => array(
|
888
|
+
|
889
|
+
'existing_section' => false,
|
890
|
+
|
891
|
+
'args' => array(
|
892
|
+
'title' => __( 'Colors', 'bramble' ),
|
893
|
+
'description' => __( 'Set your websites color scheme. Accepted color values are hex, rgba and hsla.', 'bramble' ),
|
894
|
+
'priority' => 8
|
895
|
+
),
|
896
|
+
|
897
|
+
'fields' => array(
|
898
|
+
|
899
|
+
'base_color' => array(
|
900
|
+
|
901
|
+
'setting_args' => array(
|
902
|
+
'default' => '#523F6D',
|
903
|
+
'type' => 'option',
|
904
|
+
'capability' => $bramble_customizer_capability,
|
905
|
+
'transport' => 'refresh',
|
906
|
+
),
|
907
|
+
'control_args' => array(
|
908
|
+
'label' => __( 'Primary', 'bramble' ),
|
909
|
+
'description' => __( 'Color for buttons, links & selection.', 'bramble' ),
|
910
|
+
'type' => 'color_picker',
|
911
|
+
'priority' => 1
|
912
|
+
)
|
913
|
+
),
|
914
|
+
|
915
|
+
'background_color' => array(
|
916
|
+
|
917
|
+
'setting_args' => array(
|
918
|
+
'default' => '#fafafa',
|
919
|
+
'type' => 'option',
|
920
|
+
'capability' => $bramble_customizer_capability,
|
921
|
+
'transport' => 'refresh',
|
922
|
+
),
|
923
|
+
'control_args' => array(
|
924
|
+
'label' => __( 'Page background', 'bramble' ),
|
925
|
+
'description' => __( 'Color for page background.', 'bramble' ),
|
926
|
+
'type' => 'color_picker',
|
927
|
+
'priority' => 2
|
928
|
+
)
|
929
|
+
),
|
930
|
+
|
931
|
+
'text_color' => array(
|
932
|
+
|
933
|
+
'setting_args' => array(
|
934
|
+
'default' => '#333333',
|
935
|
+
'type' => 'option',
|
936
|
+
'capability' => $bramble_customizer_capability,
|
937
|
+
'transport' => 'refresh',
|
938
|
+
),
|
939
|
+
'control_args' => array(
|
940
|
+
'label' => __( 'Text', 'bramble' ),
|
941
|
+
'description' => __( 'Text color for paragraphs.', 'bramble' ),
|
942
|
+
'type' => 'color_picker',
|
943
|
+
'priority' => 3
|
944
|
+
)
|
945
|
+
),
|
946
|
+
|
947
|
+
'headings_color' => array(
|
948
|
+
|
949
|
+
'setting_args' => array(
|
950
|
+
'default' => '#333333',
|
951
|
+
'type' => 'option',
|
952
|
+
'capability' => $bramble_customizer_capability,
|
953
|
+
'transport' => 'refresh',
|
954
|
+
),
|
955
|
+
'control_args' => array(
|
956
|
+
'label' => __( 'Headings', 'bramble' ),
|
957
|
+
'description' => __( 'Color for headings.', 'bramble' ),
|
958
|
+
'type' => 'color_picker',
|
959
|
+
'priority' => 4
|
960
|
+
)
|
961
|
+
),
|
962
|
+
|
963
|
+
'header_background' => array(
|
964
|
+
|
965
|
+
'setting_args' => array(
|
966
|
+
'default' => '#cccccc',
|
967
|
+
'type' => 'option',
|
968
|
+
'capability' => $bramble_customizer_capability,
|
969
|
+
'transport' => 'refresh',
|
970
|
+
),
|
971
|
+
'control_args' => array(
|
972
|
+
'label' => __( 'Header', 'bramble' ),
|
973
|
+
'description' => __( 'Header background color.', 'bramble' ),
|
974
|
+
'type' => 'color_picker',
|
975
|
+
'priority' => 5
|
976
|
+
)
|
977
|
+
),
|
978
|
+
|
979
|
+
'header_color' => array(
|
980
|
+
|
981
|
+
'setting_args' => array(
|
982
|
+
'default' => '#cccccc',
|
983
|
+
'type' => 'option',
|
984
|
+
'capability' => $bramble_customizer_capability,
|
985
|
+
'transport' => 'refresh',
|
986
|
+
),
|
987
|
+
'control_args' => array(
|
988
|
+
'label' => __( 'Header text', 'bramble' ),
|
989
|
+
'description' => __( 'Header text color.', 'bramble' ),
|
990
|
+
'type' => 'color_picker',
|
991
|
+
'priority' => 6
|
992
|
+
)
|
993
|
+
),
|
994
|
+
|
995
|
+
'top_menu_background' => array(
|
996
|
+
|
997
|
+
'setting_args' => array(
|
998
|
+
'default' => '#333333',
|
999
|
+
'type' => 'option',
|
1000
|
+
'capability' => $bramble_customizer_capability,
|
1001
|
+
'transport' => 'refresh',
|
1002
|
+
),
|
1003
|
+
'control_args' => array(
|
1004
|
+
'label' => __( 'Top menu', 'bramble' ),
|
1005
|
+
'description' => __( 'Top menu background color.', 'bramble' ),
|
1006
|
+
'type' => 'color_picker',
|
1007
|
+
'priority' => 7
|
1008
|
+
)
|
1009
|
+
),
|
1010
|
+
|
1011
|
+
'top_menu_color' => array(
|
1012
|
+
|
1013
|
+
'setting_args' => array(
|
1014
|
+
'default' => '#ffffff',
|
1015
|
+
'type' => 'option',
|
1016
|
+
'capability' => $bramble_customizer_capability,
|
1017
|
+
'transport' => 'refresh',
|
1018
|
+
),
|
1019
|
+
'control_args' => array(
|
1020
|
+
'label' => __( 'Top menu text', 'bramble' ),
|
1021
|
+
'description' => __( 'Top menu text color.', 'bramble' ),
|
1022
|
+
'type' => 'color_picker',
|
1023
|
+
'priority' => 8
|
1024
|
+
)
|
1025
|
+
),
|
1026
|
+
|
1027
|
+
'main_menu_background' => array(
|
1028
|
+
|
1029
|
+
'setting_args' => array(
|
1030
|
+
'default' => '#333333',
|
1031
|
+
'type' => 'option',
|
1032
|
+
'capability' => $bramble_customizer_capability,
|
1033
|
+
'transport' => 'refresh',
|
1034
|
+
),
|
1035
|
+
'control_args' => array(
|
1036
|
+
'label' => __( 'Main menu', 'bramble' ),
|
1037
|
+
'description' => __( 'Main menu background color.', 'bramble' ),
|
1038
|
+
'type' => 'color_picker',
|
1039
|
+
'priority' => 9
|
1040
|
+
)
|
1041
|
+
),
|
1042
|
+
|
1043
|
+
'main_menu_color' => array(
|
1044
|
+
|
1045
|
+
'setting_args' => array(
|
1046
|
+
'default' => '#ffffff',
|
1047
|
+
'type' => 'option',
|
1048
|
+
'capability' => $bramble_customizer_capability,
|
1049
|
+
'transport' => 'refresh',
|
1050
|
+
),
|
1051
|
+
'control_args' => array(
|
1052
|
+
'label' => __( 'Main menu text', 'bramble' ),
|
1053
|
+
'description' => __( 'Main menu text color.', 'bramble' ),
|
1054
|
+
'type' => 'color_picker',
|
1055
|
+
'priority' => 10
|
1056
|
+
)
|
1057
|
+
),
|
1058
|
+
|
1059
|
+
'sidebar_left_text_color' => array(
|
1060
|
+
|
1061
|
+
'setting_args' => array(
|
1062
|
+
'default' => '#ffffff',
|
1063
|
+
'type' => 'option',
|
1064
|
+
'capability' => $bramble_customizer_capability,
|
1065
|
+
'transport' => 'refresh',
|
1066
|
+
),
|
1067
|
+
'control_args' => array(
|
1068
|
+
'label' => __( 'Left sidebar text', 'bramble' ),
|
1069
|
+
'description' => __( 'Left sidebar text color.', 'bramble' ),
|
1070
|
+
'type' => 'color_picker',
|
1071
|
+
'priority' => 11
|
1072
|
+
)
|
1073
|
+
),
|
1074
|
+
|
1075
|
+
'sidebar_left_headings_color' => array(
|
1076
|
+
|
1077
|
+
'setting_args' => array(
|
1078
|
+
'default' => '#ffffff',
|
1079
|
+
'type' => 'option',
|
1080
|
+
'capability' => $bramble_customizer_capability,
|
1081
|
+
'transport' => 'refresh',
|
1082
|
+
),
|
1083
|
+
'control_args' => array(
|
1084
|
+
'label' => __( 'Left sidebar headings', 'bramble' ),
|
1085
|
+
'description' => __( 'Left sidebar headings color.', 'bramble' ),
|
1086
|
+
'type' => 'color_picker',
|
1087
|
+
'priority' => 12
|
1088
|
+
)
|
1089
|
+
),
|
1090
|
+
|
1091
|
+
'sidebar_right_text_color' => array(
|
1092
|
+
|
1093
|
+
'setting_args' => array(
|
1094
|
+
'default' => '#ffffff',
|
1095
|
+
'type' => 'option',
|
1096
|
+
'capability' => $bramble_customizer_capability,
|
1097
|
+
'transport' => 'refresh',
|
1098
|
+
),
|
1099
|
+
'control_args' => array(
|
1100
|
+
'label' => __( 'Right sidebar text', 'bramble' ),
|
1101
|
+
'description' => __( 'Right sidebar text color.', 'bramble' ),
|
1102
|
+
'type' => 'color_picker',
|
1103
|
+
'priority' => 13
|
1104
|
+
)
|
1105
|
+
),
|
1106
|
+
|
1107
|
+
'sidebar_right_headings_color' => array(
|
1108
|
+
|
1109
|
+
'setting_args' => array(
|
1110
|
+
'default' => '#ffffff',
|
1111
|
+
'type' => 'option',
|
1112
|
+
'capability' => $bramble_customizer_capability,
|
1113
|
+
'transport' => 'refresh',
|
1114
|
+
),
|
1115
|
+
'control_args' => array(
|
1116
|
+
'label' => __( 'Right sidebar headings', 'bramble' ),
|
1117
|
+
'description' => __( 'Right sidebar headings color.', 'bramble' ),
|
1118
|
+
'type' => 'color_picker',
|
1119
|
+
'priority' => 14
|
1120
|
+
)
|
1121
|
+
),
|
1122
|
+
|
1123
|
+
'footer_background' => array(
|
1124
|
+
|
1125
|
+
'setting_args' => array(
|
1126
|
+
'default' => '#cccccc',
|
1127
|
+
'type' => 'option',
|
1128
|
+
'capability' => $bramble_customizer_capability,
|
1129
|
+
'transport' => 'refresh',
|
1130
|
+
),
|
1131
|
+
'control_args' => array(
|
1132
|
+
'label' => __( 'Footer', 'bramble' ),
|
1133
|
+
'description' => __( 'Footer background color.', 'bramble' ),
|
1134
|
+
'type' => 'color_picker',
|
1135
|
+
'priority' => 15
|
1136
|
+
)
|
1137
|
+
),
|
1138
|
+
|
1139
|
+
'footer_color' => array(
|
1140
|
+
|
1141
|
+
'setting_args' => array(
|
1142
|
+
'default' => '#ffffff',
|
1143
|
+
'type' => 'option',
|
1144
|
+
'capability' => $bramble_customizer_capability,
|
1145
|
+
'transport' => 'refresh',
|
1146
|
+
),
|
1147
|
+
'control_args' => array(
|
1148
|
+
'label' => __( 'Footer text', 'bramble' ),
|
1149
|
+
'description' => __( 'Footer text color.', 'bramble' ),
|
1150
|
+
'type' => 'color_picker',
|
1151
|
+
'priority' => 16
|
1152
|
+
)
|
1153
|
+
),
|
1154
|
+
|
1155
|
+
'footer_headings_color' => array(
|
1156
|
+
|
1157
|
+
'setting_args' => array(
|
1158
|
+
'default' => '#ffffff',
|
1159
|
+
'type' => 'option',
|
1160
|
+
'capability' => $bramble_customizer_capability,
|
1161
|
+
'transport' => 'refresh',
|
1162
|
+
),
|
1163
|
+
'control_args' => array(
|
1164
|
+
'label' => __( 'Footer headings', 'bramble' ),
|
1165
|
+
'description' => __( 'Footer headings color.', 'bramble' ),
|
1166
|
+
'type' => 'color_picker',
|
1167
|
+
'priority' => 17
|
1168
|
+
)
|
1169
|
+
),
|
1170
|
+
|
1171
|
+
'footer_menu_background' => array(
|
1172
|
+
|
1173
|
+
'setting_args' => array(
|
1174
|
+
'default' => '#333333',
|
1175
|
+
'type' => 'option',
|
1176
|
+
'capability' => $bramble_customizer_capability,
|
1177
|
+
'transport' => 'refresh',
|
1178
|
+
),
|
1179
|
+
'control_args' => array(
|
1180
|
+
'label' => __( 'Footer menu', 'bramble' ),
|
1181
|
+
'description' => __( 'Footer menu background color.', 'bramble' ),
|
1182
|
+
'type' => 'color_picker',
|
1183
|
+
'priority' => 18
|
1184
|
+
)
|
1185
|
+
),
|
1186
|
+
|
1187
|
+
'footer_menu_color' => array(
|
1188
|
+
|
1189
|
+
'setting_args' => array(
|
1190
|
+
'default' => '#ffffff',
|
1191
|
+
'type' => 'option',
|
1192
|
+
'capability' => $bramble_customizer_capability,
|
1193
|
+
'transport' => 'refresh',
|
1194
|
+
),
|
1195
|
+
'control_args' => array(
|
1196
|
+
'label' => __( 'Footer menu text', 'bramble' ),
|
1197
|
+
'description' => __( 'Footer menu text color.', 'bramble' ),
|
1198
|
+
'type' => 'color_picker',
|
1199
|
+
'priority' => 19
|
1200
|
+
)
|
1201
|
+
),
|
1202
|
+
|
1203
|
+
'credits_background' => array(
|
1204
|
+
|
1205
|
+
'setting_args' => array(
|
1206
|
+
'default' => '#333333',
|
1207
|
+
'type' => 'option',
|
1208
|
+
'capability' => $bramble_customizer_capability,
|
1209
|
+
'transport' => 'refresh',
|
1210
|
+
),
|
1211
|
+
'control_args' => array(
|
1212
|
+
'label' => __( 'Credits', 'bramble' ),
|
1213
|
+
'description' => __( 'Credits background color.', 'bramble' ),
|
1214
|
+
'type' => 'color_picker',
|
1215
|
+
'priority' => 20
|
1216
|
+
)
|
1217
|
+
),
|
1218
|
+
|
1219
|
+
'credits_color' => array(
|
1220
|
+
|
1221
|
+
'setting_args' => array(
|
1222
|
+
'default' => '#ffffff',
|
1223
|
+
'type' => 'option',
|
1224
|
+
'capability' => $bramble_customizer_capability,
|
1225
|
+
'transport' => 'refresh',
|
1226
|
+
),
|
1227
|
+
'control_args' => array(
|
1228
|
+
'label' => __( 'Credits text', 'bramble' ),
|
1229
|
+
'description' => __( 'Credits text color.', 'bramble' ),
|
1230
|
+
'type' => 'color_picker',
|
1231
|
+
'priority' => 21
|
1232
|
+
)
|
1233
|
+
),
|
1234
|
+
)
|
1235
|
+
),
|
1236
|
+
|
1237
|
+
'bramble_background_images' => array(
|
1238
|
+
|
1239
|
+
'existing_section' => false,
|
1240
|
+
|
1241
|
+
'args' => array(
|
1242
|
+
'title' => __( 'Background Images', 'bramble' ),
|
1243
|
+
'description' => __( 'Set background images.', 'bramble' ),
|
1244
|
+
'priority' => 9
|
1245
|
+
),
|
1246
|
+
|
1247
|
+
'fields' => array(
|
1248
|
+
|
1249
|
+
'custom_header_image' => array(
|
1250
|
+
'setting_args' => array(
|
1251
|
+
'default' => get_stylesheet_directory_uri() .'/images/header.png',
|
1252
|
+
'type' => 'option',
|
1253
|
+
'capability' => $bramble_customizer_capability,
|
1254
|
+
'transport' => 'refresh',
|
1255
|
+
),
|
1256
|
+
'control_args' => array(
|
1257
|
+
'label' => __( 'Custom Header Image', 'bramble' ),
|
1258
|
+
'type' => 'image',
|
1259
|
+
'priority' => 1
|
1260
|
+
)
|
1261
|
+
),
|
1262
|
+
|
1263
|
+
'header_image_size' => array(
|
1264
|
+
|
1265
|
+
'setting_args' => array(
|
1266
|
+
'default' => 'cover',
|
1267
|
+
'type' => 'option',
|
1268
|
+
'capability' => $bramble_customizer_capability,
|
1269
|
+
'transport' => 'refresh',
|
1270
|
+
),
|
1271
|
+
'control_args' => array(
|
1272
|
+
'label' => __( 'Header image size', 'bramble' ),
|
1273
|
+
'description' => __( 'Set custom header image size.', 'bramble' ),
|
1274
|
+
'type' => 'radio_switch',
|
1275
|
+
'choices' => array(
|
1276
|
+
'contain' => array(
|
1277
|
+
'label' => __( 'Contain', 'bramble' )
|
1278
|
+
),
|
1279
|
+
'cover' => array(
|
1280
|
+
'label' => __( 'Cover', 'bramble' )
|
1281
|
+
),
|
1282
|
+
'repeat' => array(
|
1283
|
+
'label' => __( 'Repeat', 'bramble' )
|
1284
|
+
)
|
1285
|
+
),
|
1286
|
+
'priority' => 2
|
1287
|
+
)
|
1288
|
+
),
|
1289
|
+
|
1290
|
+
'custom_background_image' => array(
|
1291
|
+
'setting_args' => array(
|
1292
|
+
'default' => get_stylesheet_directory_uri() .'/images/background.png',
|
1293
|
+
'type' => 'option',
|
1294
|
+
'capability' => $bramble_customizer_capability,
|
1295
|
+
'transport' => 'refresh',
|
1296
|
+
),
|
1297
|
+
'control_args' => array(
|
1298
|
+
'label' => __( 'Custom Background Image', 'bramble' ),
|
1299
|
+
'type' => 'image',
|
1300
|
+
'priority' => 3
|
1301
|
+
)
|
1302
|
+
),
|
1303
|
+
|
1304
|
+
'background_image_size' => array(
|
1305
|
+
|
1306
|
+
'setting_args' => array(
|
1307
|
+
'default' => 'repeat',
|
1308
|
+
'type' => 'option',
|
1309
|
+
'capability' => $bramble_customizer_capability,
|
1310
|
+
'transport' => 'refresh',
|
1311
|
+
),
|
1312
|
+
'control_args' => array(
|
1313
|
+
'label' => __( 'Background image size', 'bramble' ),
|
1314
|
+
'description' => __( 'Set custom background image size.', 'bramble' ),
|
1315
|
+
'type' => 'radio_switch',
|
1316
|
+
'choices' => array(
|
1317
|
+
'contain' => array(
|
1318
|
+
'label' => __( 'Contain', 'bramble' )
|
1319
|
+
),
|
1320
|
+
'cover' => array(
|
1321
|
+
'label' => __( 'Cover', 'bramble' )
|
1322
|
+
),
|
1323
|
+
'repeat' => array(
|
1324
|
+
'label' => __( 'Repeat', 'bramble' )
|
1325
|
+
)
|
1326
|
+
),
|
1327
|
+
'priority' => 4
|
1328
|
+
)
|
1329
|
+
),
|
1330
|
+
)
|
1331
|
+
),
|
1332
|
+
|
1333
|
+
);
|
1334
|
+
|
1335
|
+
return $<%= theme_id %>_options;
|
1336
|
+
|
1337
|
+
}
|
1338
|
+
|
1339
|
+
add_filter( 'bramble_customizer_options_array', '<%= theme_id %>_customizer_options' );
|