Gutenberg Blocks – ACF Blocks Suite - Version 1.5.0

Version Description

  • New: Tab Block Added
  • New: Toggle Block Added
  • New: Accordion Block Added
Download this release

Release Info

Developer munirkamal
Plugin Icon 128x128 Gutenberg Blocks – ACF Blocks Suite
Version 1.5.0
Comparing to
See all releases

Code changes from version 1.4.0 to 1.5.0

acf-blocks.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: ACF Blocks
4
  * Plugin URI: https://acfblocks.com/
5
  * Description: Supercharge your Gutenberg editor with high quality beautiful WordPress blocks. Ready-to-use ACF Blocks!
6
- * Version: 1.4.0
7
  * Author: munirkamal
8
  * Author URI: https://munirkamal.wordpress.com
9
  * License: GPL2
@@ -285,6 +285,52 @@ function acfb_blocks() {
285
  },
286
  ));
287
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
288
  }
289
 
290
  }
3
  * Plugin Name: ACF Blocks
4
  * Plugin URI: https://acfblocks.com/
5
  * Description: Supercharge your Gutenberg editor with high quality beautiful WordPress blocks. Ready-to-use ACF Blocks!
6
+ * Version: 1.5.0
7
  * Author: munirkamal
8
  * Author URI: https://munirkamal.wordpress.com
9
  * License: GPL2
285
  },
286
  ));
287
 
288
+
289
+ // register a Tabs Block.
290
+ acf_register_block(array(
291
+ 'name' => 'acfb-tabs',
292
+ 'mode' => 'preview',
293
+ 'title' => __('Tabs'),
294
+ 'description' => __('Add tabbed content in your posts/pages.'),
295
+ 'render_template' => plugin_dir_path( __FILE__ ) . 'block-templates/tabs.php',
296
+ 'category' => 'acfb-blocks',
297
+ 'icon' => '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M861.29152 933.87264H162.70848c-40.08448 0-72.58112-32.49664-72.58112-72.58624V162.70848c0-40.08448 32.49664-72.58112 72.58112-72.58112h203.10016V222.72h568.06912v638.58176c-0.00512 40.07936-32.49664 72.57088-72.58624 72.57088z m5.74976-644.3264H156.95872v524.05248c0 34.12992 27.66336 61.7984 61.7984 61.7984h586.48064c34.12992 0 61.7984-27.66848 61.7984-61.7984V289.54624z m-200.49408-199.41888h194.74432c40.0896 0 72.58624 32.49664 72.58624 72.58112v34.944h-267.33056V90.12736z m-275.67616 0h250.61888v107.52512H390.87104V90.12736z"/></svg>',
298
+ 'enqueue_assets' => function(){
299
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
300
+ wp_enqueue_script( 'acfb-tabs-js', plugin_dir_url( __FILE__ ) . 'js/tabs.js', array('jquery'), '', true );
301
+ },
302
+ ));
303
+
304
+ // register a Toggle Block.
305
+ acf_register_block(array(
306
+ 'name' => 'acfb-toggle',
307
+ 'mode' => 'preview',
308
+ 'title' => __('Toggle'),
309
+ 'description' => __('Add toggleable content in your pages/posts.'),
310
+ 'render_template' => plugin_dir_path( __FILE__ ) . 'block-templates/toggle.php',
311
+ 'category' => 'acfb-blocks',
312
+ 'icon' => '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M0 0l0 1024 1024 0 0-1024-1024 0zM963.764706 60.235294l0 542.117647-903.529412 0 0-542.117647 903.529412 0zM963.764706 662.588235l0 120.470588-903.529412 0 0-120.470588 903.529412 0zM60.235294 963.764706l0-120.470588 903.529412 0 0 120.470588-903.529412 0z" /></svg>',
313
+ 'enqueue_assets' => function(){
314
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
315
+ wp_enqueue_script( 'acfb-toggle-js', plugin_dir_url( __FILE__ ) . 'js/toggle.js', array('jquery'), '', true );
316
+ },
317
+ ));
318
+
319
+ // register a Accordion Block.
320
+ acf_register_block(array(
321
+ 'name' => 'acfb-accordion',
322
+ 'mode' => 'preview',
323
+ 'title' => __('Accordion'),
324
+ 'description' => __('Add accordion content in your pages/posts.'),
325
+ 'render_template' => plugin_dir_path( __FILE__ ) . 'block-templates/accordion.php',
326
+ 'category' => 'acfb-blocks',
327
+ 'icon' => '<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M0 0v180.705882h1024V0H0z m963.764706 120.470588H60.235294V60.235294h903.529412v60.235294zM0 783.058824h1024V240.941176H0v542.117648z m60.235294-481.882353h903.529412v421.647058H60.235294V301.176471zM0 1024h1024v-180.705882H0v180.705882z m60.235294-120.470588h903.529412v60.235294H60.235294v-60.235294z" /></svg>',
328
+ 'enqueue_assets' => function(){
329
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
330
+ wp_enqueue_script( 'acfb-accordion-js', plugin_dir_url( __FILE__ ) . 'js/accordion.js', array('jquery'), '', true );
331
+ },
332
+ ));
333
+
334
  }
335
 
336
  }
acf-json/group_5cfe3ba49f760.json ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "key": "group_5cfe3ba49f760",
3
+ "title": "Tabs",
4
+ "private": true,
5
+ "fields": [
6
+ {
7
+ "key": "field_5cfe4727e8c3f",
8
+ "label": "Content",
9
+ "name": "",
10
+ "type": "tab",
11
+ "instructions": "",
12
+ "required": 0,
13
+ "conditional_logic": 0,
14
+ "wrapper": {
15
+ "width": "",
16
+ "class": "",
17
+ "id": ""
18
+ },
19
+ "placement": "top",
20
+ "endpoint": 0
21
+ },
22
+ {
23
+ "key": "field_5cfe4756e8c41",
24
+ "label": "Add Tab",
25
+ "name": "acfb_add_tab",
26
+ "type": "repeater",
27
+ "instructions": "",
28
+ "required": 0,
29
+ "conditional_logic": 0,
30
+ "wrapper": {
31
+ "width": "",
32
+ "class": "",
33
+ "id": ""
34
+ },
35
+ "collapsed": "",
36
+ "min": 1,
37
+ "max": 0,
38
+ "layout": "block",
39
+ "button_label": "Add Tab",
40
+ "sub_fields": [
41
+ {
42
+ "key": "field_5cfe4781e8c42",
43
+ "label": "Tab Title",
44
+ "name": "acfb_tab_title",
45
+ "type": "text",
46
+ "instructions": "",
47
+ "required": 0,
48
+ "conditional_logic": 0,
49
+ "wrapper": {
50
+ "width": "",
51
+ "class": "",
52
+ "id": ""
53
+ },
54
+ "default_value": "Title",
55
+ "placeholder": "Title",
56
+ "prepend": "",
57
+ "append": "",
58
+ "maxlength": ""
59
+ },
60
+ {
61
+ "key": "field_5cfe4793e8c43",
62
+ "label": "Tab Content",
63
+ "name": "acfb_tab_content",
64
+ "type": "textarea",
65
+ "instructions": "",
66
+ "required": 0,
67
+ "conditional_logic": 0,
68
+ "wrapper": {
69
+ "width": "",
70
+ "class": "",
71
+ "id": ""
72
+ },
73
+ "default_value": "Tab Content",
74
+ "placeholder": "Tab Content",
75
+ "maxlength": "",
76
+ "rows": "",
77
+ "new_lines": ""
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "key": "field_5cfe4747e8c40",
83
+ "label": "Design",
84
+ "name": "",
85
+ "type": "tab",
86
+ "instructions": "",
87
+ "required": 0,
88
+ "conditional_logic": 0,
89
+ "wrapper": {
90
+ "width": "",
91
+ "class": "",
92
+ "id": ""
93
+ },
94
+ "placement": "top",
95
+ "endpoint": 0
96
+ },
97
+ {
98
+ "key": "field_5cffaa63cfbd0",
99
+ "label": "Title Background Color",
100
+ "name": "acfb_tab_title_background",
101
+ "type": "color_picker",
102
+ "instructions": "",
103
+ "required": 0,
104
+ "conditional_logic": 0,
105
+ "wrapper": {
106
+ "width": "",
107
+ "class": "",
108
+ "id": ""
109
+ },
110
+ "default_value": "#e0e0e0"
111
+ },
112
+ {
113
+ "key": "field_5cffaa83cfbd1",
114
+ "label": "Title Color",
115
+ "name": "acfb_tab_title_color",
116
+ "type": "color_picker",
117
+ "instructions": "",
118
+ "required": 0,
119
+ "conditional_logic": 0,
120
+ "wrapper": {
121
+ "width": "",
122
+ "class": "",
123
+ "id": ""
124
+ },
125
+ "default_value": "#191e23"
126
+ },
127
+ {
128
+ "key": "field_5cffaaa8cfbd2",
129
+ "label": "Title Active Background Color",
130
+ "name": "acfb_tab_title_active_background",
131
+ "type": "color_picker",
132
+ "instructions": "",
133
+ "required": 0,
134
+ "conditional_logic": 0,
135
+ "wrapper": {
136
+ "width": "",
137
+ "class": "",
138
+ "id": ""
139
+ },
140
+ "default_value": "#f3f4f5"
141
+ },
142
+ {
143
+ "key": "field_5cffaad9cfbd3",
144
+ "label": "Title Active Color",
145
+ "name": "acfb_tab_title_active_color",
146
+ "type": "color_picker",
147
+ "instructions": "",
148
+ "required": 0,
149
+ "conditional_logic": 0,
150
+ "wrapper": {
151
+ "width": "",
152
+ "class": "",
153
+ "id": ""
154
+ },
155
+ "default_value": "#191e23"
156
+ },
157
+ {
158
+ "key": "field_5cffab21cfbd4",
159
+ "label": "Title Size",
160
+ "name": "acfb_tab_title_size",
161
+ "type": "range",
162
+ "instructions": "",
163
+ "required": 0,
164
+ "conditional_logic": 0,
165
+ "wrapper": {
166
+ "width": "",
167
+ "class": "",
168
+ "id": ""
169
+ },
170
+ "default_value": 18,
171
+ "min": "",
172
+ "max": 200,
173
+ "step": "",
174
+ "prepend": "",
175
+ "append": "px"
176
+ },
177
+ {
178
+ "key": "field_5cffab63cfbd5",
179
+ "label": "Content Background color",
180
+ "name": "acfb_tab_content_background",
181
+ "type": "color_picker",
182
+ "instructions": "",
183
+ "required": 0,
184
+ "conditional_logic": 0,
185
+ "wrapper": {
186
+ "width": "",
187
+ "class": "",
188
+ "id": ""
189
+ },
190
+ "default_value": "#f3f4f5"
191
+ },
192
+ {
193
+ "key": "field_5cffab7bcfbd6",
194
+ "label": "Content Color",
195
+ "name": "acfb_tab_content_color",
196
+ "type": "color_picker",
197
+ "instructions": "",
198
+ "required": 0,
199
+ "conditional_logic": 0,
200
+ "wrapper": {
201
+ "width": "",
202
+ "class": "",
203
+ "id": ""
204
+ },
205
+ "default_value": "#191e23"
206
+ },
207
+ {
208
+ "key": "field_5cffab95cfbd7",
209
+ "label": "Content Size",
210
+ "name": "acfb_tab_content_size",
211
+ "type": "range",
212
+ "instructions": "",
213
+ "required": 0,
214
+ "conditional_logic": 0,
215
+ "wrapper": {
216
+ "width": "",
217
+ "class": "",
218
+ "id": ""
219
+ },
220
+ "default_value": 18,
221
+ "min": "",
222
+ "max": 200,
223
+ "step": "",
224
+ "prepend": "",
225
+ "append": "px"
226
+ }
227
+ ],
228
+ "location": [
229
+ [
230
+ {
231
+ "param": "block",
232
+ "operator": "==",
233
+ "value": "acf\/acfb-tabs"
234
+ }
235
+ ]
236
+ ],
237
+ "menu_order": 0,
238
+ "position": "normal",
239
+ "style": "default",
240
+ "label_placement": "top",
241
+ "instruction_placement": "label",
242
+ "hide_on_screen": "",
243
+ "active": 1,
244
+ "description": "",
245
+ "modified": 1561363715
246
+ }
acf-json/group_5cff80b5c59d1.json ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "key": "group_5cff80b5c59d1",
3
+ "title": "Toggle",
4
+ "private": true,
5
+ "fields": [
6
+ {
7
+ "key": "field_5cff85bd73eb0",
8
+ "label": "Content",
9
+ "name": "",
10
+ "type": "tab",
11
+ "instructions": "",
12
+ "required": 0,
13
+ "conditional_logic": 0,
14
+ "wrapper": {
15
+ "width": "",
16
+ "class": "",
17
+ "id": ""
18
+ },
19
+ "placement": "top",
20
+ "endpoint": 0
21
+ },
22
+ {
23
+ "key": "field_5cff85a073eaf",
24
+ "label": "Toggle Title",
25
+ "name": "acfb_toggle_title",
26
+ "type": "text",
27
+ "instructions": "",
28
+ "required": 0,
29
+ "conditional_logic": 0,
30
+ "wrapper": {
31
+ "width": "",
32
+ "class": "",
33
+ "id": ""
34
+ },
35
+ "default_value": "Toggle Title",
36
+ "placeholder": "Toggle Title",
37
+ "prepend": "",
38
+ "append": "",
39
+ "maxlength": ""
40
+ },
41
+ {
42
+ "key": "field_5cff85d973eb2",
43
+ "label": "Toggle Content",
44
+ "name": "acfb_toggle_content",
45
+ "type": "textarea",
46
+ "instructions": "",
47
+ "required": 0,
48
+ "conditional_logic": 0,
49
+ "wrapper": {
50
+ "width": "",
51
+ "class": "",
52
+ "id": ""
53
+ },
54
+ "default_value": "Toggle Content",
55
+ "placeholder": "Toggle Content",
56
+ "maxlength": "",
57
+ "rows": "",
58
+ "new_lines": ""
59
+ },
60
+ {
61
+ "key": "field_5cff85cb73eb1",
62
+ "label": "Design",
63
+ "name": "",
64
+ "type": "tab",
65
+ "instructions": "",
66
+ "required": 0,
67
+ "conditional_logic": 0,
68
+ "wrapper": {
69
+ "width": "",
70
+ "class": "",
71
+ "id": ""
72
+ },
73
+ "placement": "top",
74
+ "endpoint": 0
75
+ },
76
+ {
77
+ "key": "field_5d00bdc12ab0e",
78
+ "label": "Title Alignment",
79
+ "name": "acfb_toogle_title_alignment",
80
+ "type": "button_group",
81
+ "instructions": "",
82
+ "required": 0,
83
+ "conditional_logic": 0,
84
+ "wrapper": {
85
+ "width": "",
86
+ "class": "",
87
+ "id": ""
88
+ },
89
+ "choices": {
90
+ "left": "Left",
91
+ "center": "Center",
92
+ "right": "Right"
93
+ },
94
+ "allow_null": 0,
95
+ "default_value": "left",
96
+ "layout": "horizontal",
97
+ "return_format": "value"
98
+ },
99
+ {
100
+ "key": "field_5cff9e9b76685",
101
+ "label": "Title Background Color",
102
+ "name": "acfb_toggle_title_background",
103
+ "type": "color_picker",
104
+ "instructions": "",
105
+ "required": 0,
106
+ "conditional_logic": 0,
107
+ "wrapper": {
108
+ "width": "",
109
+ "class": "",
110
+ "id": ""
111
+ },
112
+ "default_value": "#f3f4f5"
113
+ },
114
+ {
115
+ "key": "field_5cff9ed876686",
116
+ "label": "Title Color",
117
+ "name": "acfb_toggle_title_color",
118
+ "type": "color_picker",
119
+ "instructions": "",
120
+ "required": 0,
121
+ "conditional_logic": 0,
122
+ "wrapper": {
123
+ "width": "",
124
+ "class": "",
125
+ "id": ""
126
+ },
127
+ "default_value": "#191e23"
128
+ },
129
+ {
130
+ "key": "field_5cff9f0976687",
131
+ "label": "Title Hover Background Color",
132
+ "name": "acfb_toggle_title_hover_background",
133
+ "type": "color_picker",
134
+ "instructions": "",
135
+ "required": 0,
136
+ "conditional_logic": 0,
137
+ "wrapper": {
138
+ "width": "",
139
+ "class": "",
140
+ "id": ""
141
+ },
142
+ "default_value": "#e0e0e0"
143
+ },
144
+ {
145
+ "key": "field_5cff9f3076688",
146
+ "label": "Title Hover Color",
147
+ "name": "acfb_toggle_title_hover_color",
148
+ "type": "color_picker",
149
+ "instructions": "",
150
+ "required": 0,
151
+ "conditional_logic": 0,
152
+ "wrapper": {
153
+ "width": "",
154
+ "class": "",
155
+ "id": ""
156
+ },
157
+ "default_value": "#191e23"
158
+ },
159
+ {
160
+ "key": "field_5cff9f5976689",
161
+ "label": "Title Size",
162
+ "name": "acfb_toggle_title_size",
163
+ "type": "range",
164
+ "instructions": "",
165
+ "required": 0,
166
+ "conditional_logic": 0,
167
+ "wrapper": {
168
+ "width": "",
169
+ "class": "",
170
+ "id": ""
171
+ },
172
+ "default_value": 18,
173
+ "min": "",
174
+ "max": 200,
175
+ "step": "",
176
+ "prepend": "",
177
+ "append": "px"
178
+ },
179
+ {
180
+ "key": "field_5cff9f927668a",
181
+ "label": "Content Background color",
182
+ "name": "acfb_toggle_content_background",
183
+ "type": "color_picker",
184
+ "instructions": "",
185
+ "required": 0,
186
+ "conditional_logic": 0,
187
+ "wrapper": {
188
+ "width": "",
189
+ "class": "",
190
+ "id": ""
191
+ },
192
+ "default_value": "#f3f4f5"
193
+ },
194
+ {
195
+ "key": "field_5cff9fbd7668b",
196
+ "label": "Content Color",
197
+ "name": "acfb_toggle_content_color",
198
+ "type": "color_picker",
199
+ "instructions": "",
200
+ "required": 0,
201
+ "conditional_logic": 0,
202
+ "wrapper": {
203
+ "width": "",
204
+ "class": "",
205
+ "id": ""
206
+ },
207
+ "default_value": "#191e23"
208
+ },
209
+ {
210
+ "key": "field_5cff9fe87668c",
211
+ "label": "Content Size",
212
+ "name": "acfb_toggle_content_size",
213
+ "type": "range",
214
+ "instructions": "",
215
+ "required": 0,
216
+ "conditional_logic": 0,
217
+ "wrapper": {
218
+ "width": "",
219
+ "class": "",
220
+ "id": ""
221
+ },
222
+ "default_value": 18,
223
+ "min": "",
224
+ "max": 200,
225
+ "step": "",
226
+ "prepend": "",
227
+ "append": "px"
228
+ }
229
+ ],
230
+ "location": [
231
+ [
232
+ {
233
+ "param": "block",
234
+ "operator": "==",
235
+ "value": "acf\/acfb-toggle"
236
+ }
237
+ ]
238
+ ],
239
+ "menu_order": 0,
240
+ "position": "normal",
241
+ "style": "default",
242
+ "label_placement": "top",
243
+ "instruction_placement": "label",
244
+ "hide_on_screen": "",
245
+ "active": 1,
246
+ "description": "",
247
+ "modified": 1561364475
248
+ }
acf-json/group_5cff8a6c26332.json ADDED
@@ -0,0 +1,269 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "key": "group_5cff8a6c26332",
3
+ "title": "Accordion",
4
+ "private": true,
5
+ "fields": [
6
+ {
7
+ "key": "field_5cff8f1176b4f",
8
+ "label": "Content",
9
+ "name": "",
10
+ "type": "tab",
11
+ "instructions": "",
12
+ "required": 0,
13
+ "conditional_logic": 0,
14
+ "wrapper": {
15
+ "width": "",
16
+ "class": "",
17
+ "id": ""
18
+ },
19
+ "placement": "top",
20
+ "endpoint": 0
21
+ },
22
+ {
23
+ "key": "field_5cff8f2d76b51",
24
+ "label": "Add Accordion",
25
+ "name": "acfb_add_accordion",
26
+ "type": "repeater",
27
+ "instructions": "",
28
+ "required": 0,
29
+ "conditional_logic": 0,
30
+ "wrapper": {
31
+ "width": "",
32
+ "class": "",
33
+ "id": ""
34
+ },
35
+ "collapsed": "",
36
+ "min": 1,
37
+ "max": 0,
38
+ "layout": "block",
39
+ "button_label": "Add Accordion",
40
+ "sub_fields": [
41
+ {
42
+ "key": "field_5cff8f3f76b52",
43
+ "label": "Accordion Title",
44
+ "name": "acfb_accordion_title",
45
+ "type": "text",
46
+ "instructions": "",
47
+ "required": 0,
48
+ "conditional_logic": 0,
49
+ "wrapper": {
50
+ "width": "",
51
+ "class": "",
52
+ "id": ""
53
+ },
54
+ "default_value": "Accordion Title",
55
+ "placeholder": "Accordion Title",
56
+ "prepend": "",
57
+ "append": "",
58
+ "maxlength": ""
59
+ },
60
+ {
61
+ "key": "field_5cff8f5376b53",
62
+ "label": "Accordion Content",
63
+ "name": "acfb_accordion_content",
64
+ "type": "textarea",
65
+ "instructions": "",
66
+ "required": 0,
67
+ "conditional_logic": 0,
68
+ "wrapper": {
69
+ "width": "",
70
+ "class": "",
71
+ "id": ""
72
+ },
73
+ "default_value": "Accordion Content",
74
+ "placeholder": "Accordion Content",
75
+ "maxlength": "",
76
+ "rows": "",
77
+ "new_lines": ""
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "key": "field_5cff8f2376b50",
83
+ "label": "Design",
84
+ "name": "",
85
+ "type": "tab",
86
+ "instructions": "",
87
+ "required": 0,
88
+ "conditional_logic": 0,
89
+ "wrapper": {
90
+ "width": "",
91
+ "class": "",
92
+ "id": ""
93
+ },
94
+ "placement": "top",
95
+ "endpoint": 0
96
+ },
97
+ {
98
+ "key": "field_5d00c16d8e0e8",
99
+ "label": "Title Alignment",
100
+ "name": "acfb_accordion_title_alignment",
101
+ "type": "button_group",
102
+ "instructions": "",
103
+ "required": 0,
104
+ "conditional_logic": 0,
105
+ "wrapper": {
106
+ "width": "",
107
+ "class": "",
108
+ "id": ""
109
+ },
110
+ "choices": {
111
+ "left": "Left",
112
+ "center": "Center",
113
+ "right": "Right"
114
+ },
115
+ "allow_null": 0,
116
+ "default_value": "left",
117
+ "layout": "horizontal",
118
+ "return_format": "value"
119
+ },
120
+ {
121
+ "key": "field_5cff986aa7551",
122
+ "label": "Title Background Color",
123
+ "name": "acfb_accordion_title_background",
124
+ "type": "color_picker",
125
+ "instructions": "",
126
+ "required": 0,
127
+ "conditional_logic": 0,
128
+ "wrapper": {
129
+ "width": "",
130
+ "class": "",
131
+ "id": ""
132
+ },
133
+ "default_value": "#f3f4f5"
134
+ },
135
+ {
136
+ "key": "field_5cff988da7552",
137
+ "label": "Title Color",
138
+ "name": "acfb_accordion_title_color",
139
+ "type": "color_picker",
140
+ "instructions": "",
141
+ "required": 0,
142
+ "conditional_logic": 0,
143
+ "wrapper": {
144
+ "width": "",
145
+ "class": "",
146
+ "id": ""
147
+ },
148
+ "default_value": "#191e23"
149
+ },
150
+ {
151
+ "key": "field_5cff9a8ac1149",
152
+ "label": "Title Hover Background Color",
153
+ "name": "acfb_accordion_title_hover_background",
154
+ "type": "color_picker",
155
+ "instructions": "",
156
+ "required": 0,
157
+ "conditional_logic": 0,
158
+ "wrapper": {
159
+ "width": "",
160
+ "class": "",
161
+ "id": ""
162
+ },
163
+ "default_value": "#e0e0e0"
164
+ },
165
+ {
166
+ "key": "field_5cff9aa6c114a",
167
+ "label": "Title Hover Color",
168
+ "name": "acfb_accordion_title_hover_color",
169
+ "type": "color_picker",
170
+ "instructions": "",
171
+ "required": 0,
172
+ "conditional_logic": 0,
173
+ "wrapper": {
174
+ "width": "",
175
+ "class": "",
176
+ "id": ""
177
+ },
178
+ "default_value": "#191e23"
179
+ },
180
+ {
181
+ "key": "field_5cff98c2a7553",
182
+ "label": "Title Size",
183
+ "name": "acfb_accordion_title_size",
184
+ "type": "range",
185
+ "instructions": "",
186
+ "required": 0,
187
+ "conditional_logic": 0,
188
+ "wrapper": {
189
+ "width": "",
190
+ "class": "",
191
+ "id": ""
192
+ },
193
+ "default_value": 18,
194
+ "min": "",
195
+ "max": 200,
196
+ "step": "",
197
+ "prepend": "",
198
+ "append": "px"
199
+ },
200
+ {
201
+ "key": "field_5cff9910a7554",
202
+ "label": "Content Background color",
203
+ "name": "acfb_accordion_content_background",
204
+ "type": "color_picker",
205
+ "instructions": "",
206
+ "required": 0,
207
+ "conditional_logic": 0,
208
+ "wrapper": {
209
+ "width": "",
210
+ "class": "",
211
+ "id": ""
212
+ },
213
+ "default_value": "#f3f4f5"
214
+ },
215
+ {
216
+ "key": "field_5cff9951a7555",
217
+ "label": "Content Color",
218
+ "name": "acfb_accordion_content_color",
219
+ "type": "color_picker",
220
+ "instructions": "",
221
+ "required": 0,
222
+ "conditional_logic": 0,
223
+ "wrapper": {
224
+ "width": "",
225
+ "class": "",
226
+ "id": ""
227
+ },
228
+ "default_value": "#191e23"
229
+ },
230
+ {
231
+ "key": "field_5cff996ea7556",
232
+ "label": "Content Size",
233
+ "name": "acfb_accordion_content_size",
234
+ "type": "range",
235
+ "instructions": "",
236
+ "required": 0,
237
+ "conditional_logic": 0,
238
+ "wrapper": {
239
+ "width": "",
240
+ "class": "",
241
+ "id": ""
242
+ },
243
+ "default_value": 18,
244
+ "min": "",
245
+ "max": 200,
246
+ "step": "",
247
+ "prepend": "",
248
+ "append": "px"
249
+ }
250
+ ],
251
+ "location": [
252
+ [
253
+ {
254
+ "param": "block",
255
+ "operator": "==",
256
+ "value": "acf\/acfb-accordion"
257
+ }
258
+ ]
259
+ ],
260
+ "menu_order": 0,
261
+ "position": "normal",
262
+ "style": "default",
263
+ "label_placement": "top",
264
+ "instruction_placement": "label",
265
+ "hide_on_screen": "",
266
+ "active": 1,
267
+ "description": "",
268
+ "modified": 1561364582
269
+ }
block-templates/accordion.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $uid = $block['id'];
3
+ $uid_accordion = str_replace("block","accordion",$uid);
4
+
5
+ $className = 'acfb_accordion_block';
6
+ if( !empty($block['className']) ) {
7
+ $className .= ' ' . $block['className'];
8
+ }
9
+ if( !empty($block['align']) ) {
10
+ $className .= ' align' . $block['align'];
11
+ }
12
+
13
+ ?>
14
+
15
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
16
+ <style>
17
+ .<?php echo $uid; ?> .acfb_accordion .acfb_accordion_title {
18
+ background: <?php the_field('acfb_accordion_title_background'); ?>;
19
+ color: <?php the_field('acfb_accordion_title_color'); ?>;
20
+ font-size: <?php the_field('acfb_accordion_title_size'); ?>px;
21
+ text-align: <?php the_field('acfb_accordion_title_alignment'); ?>;
22
+ }
23
+
24
+ .<?php echo $uid; ?> .acfb_accordion .acfb_accordion_title:hover{
25
+ background: <?php the_field('acfb_accordion_title_hover_background'); ?>;
26
+ color: <?php the_field('acfb_accordion_title_hover_color'); ?>;
27
+ }
28
+
29
+ .<?php echo $uid; ?> .acfb_accordion .acfb_accordion_content {
30
+ background: <?php the_field('acfb_accordion_content_background'); ?>;
31
+ color: <?php the_field('acfb_accordion_content_color'); ?>;
32
+ font-size: <?php the_field('acfb_accordion_content_size'); ?>px;
33
+ }
34
+ </style>
35
+
36
+
37
+ <?php if( have_rows('acfb_add_accordion') ): ?>
38
+
39
+ <div class="acfb_accordion">
40
+
41
+ <?php while( have_rows('acfb_add_accordion') ): the_row(); ?>
42
+ <a href="#<?php echo $uid_accordion; ?>-<?php echo get_row_index(); ?>" class="first acfb_accordion_title"> <?php the_sub_field('acfb_accordion_title'); ?></a>
43
+ <div id="<?php echo $uid_accordion; ?>-<?php echo get_row_index(); ?>" class="acfb_accordion_content">
44
+ <div class="acfb_accordion_content_inner">
45
+ <?php the_sub_field('acfb_accordion_content'); ?>
46
+ </div>
47
+ </div>
48
+ <?php endwhile; ?>
49
+
50
+ </div>
51
+
52
+ <?php endif; ?>
53
+
54
+
55
+ </div><!-- Uid -->
block-templates/tabs.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $uid = $block['id'];
3
+ $uid_tab = str_replace("block","tab",$uid);
4
+
5
+ $className = 'acfb_tabs_block';
6
+ if( !empty($block['className']) ) {
7
+ $className .= ' ' . $block['className'];
8
+ }
9
+ if( !empty($block['align']) ) {
10
+ $className .= ' align' . $block['align'];
11
+ }
12
+ ?>
13
+
14
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
15
+ <style>
16
+ .<?php echo $uid; ?> ul li{
17
+ background: <?php the_field('acfb_tab_title_background'); ?>;
18
+ }
19
+
20
+ .<?php echo $uid; ?> ul li a {
21
+ font-size: <?php the_field('acfb_tab_title_size'); ?>px;
22
+ color: <?php the_field('acfb_tab_title_color'); ?>;
23
+ }
24
+
25
+ .<?php echo $uid; ?> ul li.active {
26
+ background: <?php the_field('acfb_tab_title_active_background'); ?>;
27
+ }
28
+
29
+ .<?php echo $uid; ?> ul li.active a {
30
+ color: <?php the_field('acfb_tab_title_active_color'); ?>;
31
+ }
32
+
33
+ .<?php echo $uid; ?> .acfb_tab_content{
34
+ background: <?php the_field('acfb_tab_content_background'); ?>;
35
+ color: <?php the_field('acfb_tab_content_color'); ?>;
36
+ font-size: <?php the_field('acfb_tab_content_size'); ?>px;
37
+ }
38
+ </style>
39
+
40
+ <?php if( have_rows('acfb_add_tab') ): ?>
41
+ <ul>
42
+ <?php while( have_rows('acfb_add_tab') ): the_row(); ?>
43
+ <li>
44
+ <a href="#<?php echo $uid_tab; ?>-<?php echo get_row_index(); ?>" class=" acfb_tab_title"><?php the_sub_field('acfb_tab_title'); ?></a>
45
+ </li>
46
+ <?php endwhile; ?>
47
+ </ul>
48
+
49
+ <?php while( have_rows('acfb_add_tab') ): the_row(); ?>
50
+ <div id="<?php echo $uid_tab; ?>-<?php echo get_row_index(); ?>" class="acfb_tab_content">
51
+ <?php the_sub_field('acfb_tab_content'); ?>
52
+ </div>
53
+ <?php endwhile; ?>
54
+ <?php endif; ?>
55
+
56
+ </div><!-- Uid -->
block-templates/toggle.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $uid = $block['id'];
3
+
4
+ $className = 'acfb_toggle_block';
5
+ if( !empty($block['className']) ) {
6
+ $className .= ' ' . $block['className'];
7
+ }
8
+ if( !empty($block['align']) ) {
9
+ $className .= ' align' . $block['align'];
10
+ }
11
+
12
+ ?>
13
+
14
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
15
+ <style>
16
+ .<?php echo $uid; ?> .acfb_toggle_title{
17
+ background: <?php the_field('acfb_toggle_title_background'); ?>;
18
+ color: <?php the_field('acfb_toggle_title_color'); ?>;
19
+ font-size: <?php the_field('acfb_toggle_title_size'); ?>px;
20
+ text-align: <?php the_field('acfb_toogle_title_alignment'); ?>;
21
+ }
22
+
23
+ .<?php echo $uid; ?> .acfb_toggle_title:hover{
24
+ background: <?php the_field('acfb_toggle_title_hover_background'); ?>;
25
+ color: <?php the_field('acfb_toggle_title_hover_color'); ?>;
26
+ }
27
+
28
+ .<?php echo $uid; ?> .acfb_toggle_content {
29
+ background: <?php the_field('acfb_toggle_content_background'); ?>;
30
+ color: <?php the_field('acfb_toggle_content_color'); ?>;
31
+ font-size: <?php the_field('acfb_toggle_content_size'); ?>px;
32
+ }
33
+ </style>
34
+
35
+ <button class="acfb_toggle_title"><?php the_field('acfb_toggle_title'); ?></button>
36
+ <div class="acfb_toggle_content"><?php the_field('acfb_toggle_content'); ?></div>
37
+
38
+
39
+ </div><!-- Uid -->
css/acfblocks.css CHANGED
@@ -764,7 +764,6 @@ svg.acfb_social_icons path {
764
 
765
 
766
  /************ Image Slider CSS ************/
767
-
768
  .acfb_slider_block{}
769
 
770
  .acfb_slider_block .swiper-container{}
@@ -813,4 +812,81 @@ svg.acfb_social_icons path {
813
 
814
  .acfb_slider_block .swiper-container .swiper-pagination .swiper-pagination-bullet-active{
815
  background: #191e23 !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
816
  }
764
 
765
 
766
  /************ Image Slider CSS ************/
 
767
  .acfb_slider_block{}
768
 
769
  .acfb_slider_block .swiper-container{}
812
 
813
  .acfb_slider_block .swiper-container .swiper-pagination .swiper-pagination-bullet-active{
814
  background: #191e23 !important;
815
+ }
816
+
817
+ /************ Tab CSS ************/
818
+ .acfb_tabs_block ul {
819
+ overflow: hidden;
820
+ margin:0;
821
+ padding:0;
822
+ }
823
+
824
+ .acfb_tabs_block ul li{
825
+ float:left;
826
+ display:inline-block;
827
+ }
828
+
829
+ .acfb_tabs_block ul li:last-child {
830
+ border-right:none;
831
+ }
832
+
833
+ .acfb_tabs_block ul li:first-child {
834
+ padding-left:0;
835
+ }
836
+
837
+ .acfb_tabs_block ul li a {
838
+ text-align:center;
839
+ display:block;
840
+ text-decoration: none;
841
+ padding: 15px 20px;
842
+ line-height: 16px;
843
+ outline: none;
844
+ cursor: pointer;
845
+ }
846
+
847
+ .acfb_tabs_block .acfb_tab_content{
848
+ padding: 20px;
849
+ }
850
+
851
+
852
+ /************ Toggle CSS ************/
853
+ .acfb_toggle_block .acfb_toggle_title{
854
+ width: 100%;
855
+ border: none;
856
+ font-weight: 600;
857
+ padding: 10px 20px;
858
+ outline: none;
859
+ cursor: pointer;
860
+ }
861
+
862
+ .acfb_toggle_block .acfb_toggle_title:hover{
863
+ width: 100%;
864
+ border: none;
865
+ }
866
+
867
+ .acfb_toggle_block .acfb_toggle_content {
868
+ display:none;
869
+ padding: 25px;
870
+ }
871
+
872
+
873
+ /************ Accordion CSS ************/
874
+ .acfb_accordion_block .acfb_accordion .acfb_accordion_title{
875
+ display: block;
876
+ font-weight: 600;
877
+ padding: 10px 20px;
878
+ outline: none;
879
+ }
880
+
881
+ .acfb_accordion_block .acfb_accordion .acfb_accordion_title:focus{
882
+ box-shadow: none;
883
+ }
884
+
885
+ .acfb_accordion_block .acfb_accordion .acfb_accordion_content{
886
+ display:none;
887
+ padding: 25px;
888
+ }
889
+
890
+ .acfb_accordion_block .acfb_accordion .acfb_accordion_content .acfb_accordion_content_inner{
891
+ display: flex;
892
  }
js/accordion.js ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($){
2
+
3
+ var initializeBlock = function( $block ) {
4
+
5
+ $block.find(".acfb_accordion_content").first().css('display', 'block');
6
+ var link = $block.find("a");
7
+
8
+ // On clicking of the links do something.
9
+ $block.find(link).on('click', function(e) {
10
+
11
+ e.preventDefault();
12
+
13
+ var a = $block.find(this).attr("href");
14
+
15
+ $block.find(a).slideDown('fast');
16
+
17
+ //$(a).slideToggle('fast');
18
+ $block.find(".acfb_accordion_content").not(a).slideUp('fast');
19
+
20
+ });
21
+
22
+
23
+
24
+ $block.find('.acfb_toggle_btn').click(function () {
25
+ $block.find('.acfb_toggle_content').toggle()
26
+ });
27
+ }
28
+
29
+ $(document).ready(function(){
30
+ $('.acfb_accordion').each(function(){
31
+ initializeBlock( $(this) );
32
+ });
33
+ });
34
+
35
+ if( window.acf ) {
36
+ window.acf.addAction( 'render_block_preview/type=acfb-accordion', initializeBlock );
37
+ }
38
+
39
+ })(jQuery);
js/tabs.js ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($){
2
+ var initializeBlock = function( $block ) {
3
+
4
+ $block.find('.acfb_tab_content').hide();
5
+ $block.find('.acfb_tab_content:first').show();
6
+ $block.find('ul li:first').addClass('active');
7
+
8
+ $block.find('ul li a').click(function(){
9
+ $block.find('ul li').removeClass('active');
10
+ $block.find(this).parent().addClass('active');
11
+ var currentTab = $block.find(this).attr('href');
12
+ $block.find('.acfb_tab_content').hide();
13
+ $block.find(currentTab).show();
14
+ return false;
15
+ });
16
+ }
17
+
18
+ $(document).ready(function(){
19
+ $('.acfb_tabs_block').each(function(){
20
+ initializeBlock( $(this) );
21
+ });
22
+ });
23
+
24
+ if( window.acf ) {
25
+ window.acf.addAction( 'render_block_preview/type=acfb-tabs', initializeBlock );
26
+ }
27
+ })(jQuery);
js/toggle.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($){
2
+ var initializeBlock = function( $block ) {
3
+ $block.find('.acfb_toggle_title').click(function () {
4
+ $block.find('.acfb_toggle_content').slideToggle('fast');
5
+ });
6
+ }
7
+
8
+ $(document).ready(function(){
9
+ $('.acfb_toggle_block').each(function(){
10
+ initializeBlock( $(this) );
11
+ });
12
+ });
13
+
14
+ if( window.acf ) {
15
+ window.acf.addAction( 'render_block_preview/type=acfb-toggle', initializeBlock );
16
+ }
17
+ })(jQuery);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: acf, acf blocks, gutenberg, block, gutenberg blocks
4
  Requires at least: 4.7
5
  Requires PHP: 5.6
6
  Tested up to: 5.2
7
- Stable tag: 1.4.0
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -18,9 +18,12 @@ ACF Blocks is a collection of ready-to-use Gutenberg Blocks for WordPress. Super
18
 
19
  <strong>An Ultimate Gutenberg Blocks Suite</strong>
20
  <ul>
21
- <li>Image Slider Block (New)</li>
22
- <li>Social Sharing Block (New)</li>
23
- <li>Photo Collage Block (New)</li>
 
 
 
24
  <li>Posts Block</li>
25
  <li>Testimonial Block</li>
26
  <li>Team Block</li>
@@ -67,6 +70,11 @@ Absolutely! You can definitely use the ACF Blocks on yours as well as your clien
67
 
68
  == Changelog ==
69
 
 
 
 
 
 
70
  = 1.4.0 =
71
  * New: Image Slider Block Added
72
 
4
  Requires at least: 4.7
5
  Requires PHP: 5.6
6
  Tested up to: 5.2
7
+ Stable tag: 1.5.0
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
18
 
19
  <strong>An Ultimate Gutenberg Blocks Suite</strong>
20
  <ul>
21
+ <li>Tab Block (New)</li>
22
+ <li>Toggle Block (New)</li>
23
+ <li>Accordion Block (New)</li>
24
+ <li>Image Slider Block</li>
25
+ <li>Social Sharing Block</li>
26
+ <li>Photo Collage Block</li>
27
  <li>Posts Block</li>
28
  <li>Testimonial Block</li>
29
  <li>Team Block</li>
70
 
71
  == Changelog ==
72
 
73
+ = 1.5.0 =
74
+ * New: Tab Block Added
75
+ * New: Toggle Block Added
76
+ * New: Accordion Block Added
77
+
78
  = 1.4.0 =
79
  * New: Image Slider Block Added
80