Gutenberg Blocks – ACF Blocks Suite - Version 1.6.0

Version Description

  • New: Scrollable Image Block Added
Download this release

Release Info

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

Code changes from version 1.5.0 to 1.6.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.5.0
7
  * Author: munirkamal
8
  * Author URI: https://munirkamal.wordpress.com
9
  * License: GPL2
@@ -331,6 +331,21 @@ function acfb_blocks() {
331
  },
332
  ));
333
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  }
335
 
336
  }
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.6.0
7
  * Author: munirkamal
8
  * Author URI: https://munirkamal.wordpress.com
9
  * License: GPL2
331
  },
332
  ));
333
 
334
+
335
+ // register a Scrollable Image Block.
336
+ acf_register_block(array(
337
+ 'name' => 'acfb-scrollable-image',
338
+ 'mode' => 'preview',
339
+ 'title' => __('Scrollable Image'),
340
+ 'description' => __('Add Scrollable Image in your pages/posts.'),
341
+ 'render_template' => plugin_dir_path( __FILE__ ) . 'block-templates/scrollable-image.php',
342
+ 'category' => 'acfb-blocks',
343
+ 'icon' => '<svg height="512pt" viewBox="-90 0 512 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m166.238281 430.144531-89.769531-94.898437 29.058594-27.488282 60.632812 64.097657 60.273438-64.058594 29.132812 27.410156zm165.761719-38.144531v-272c0-66.167969-53.832031-120-120-120h-92c-66.167969 0-120 53.832031-120 120v272c0 66.167969 53.832031 120 120 120h92c66.167969 0 120-53.832031 120-120zm-120-352c44.113281 0 80 35.886719 80 80v272c0 44.113281-35.886719 80-80 80h-92c-44.113281 0-80-35.886719-80-80v-272c0-44.113281 35.886719-80 80-80zm-46 41c-11.046875 0-20 8.953125-20 20s8.953125 20 20 20 20-8.953125 20-20-8.953125-20-20-20zm0 80c-11.046875 0-20 8.953125-20 20s8.953125 20 20 20 20-8.953125 20-20-8.953125-20-20-20zm0 80c-11.046875 0-20 8.953125-20 20s8.953125 20 20 20 20-8.953125 20-20-8.953125-20-20-20zm0 0"/></svg>',
344
+ 'enqueue_assets' => function(){
345
+ wp_enqueue_style( 'acfb-blocks-css', plugin_dir_url( __FILE__ ) . 'css/acfblocks.css' );
346
+ },
347
+ ));
348
+
349
  }
350
 
351
  }
acf-json/group_5d8c7aea13336.json ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "key": "group_5d8c7aea13336",
3
+ "title": "Scrollable Image",
4
+ "private": true,
5
+ "fields": [
6
+ {
7
+ "key": "field_5d8c805fe9908",
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_5d8c8074e990a",
24
+ "label": "Scrollable Image",
25
+ "name": "acfb_scrollable_image",
26
+ "type": "image",
27
+ "instructions": "",
28
+ "required": 0,
29
+ "conditional_logic": 0,
30
+ "wrapper": {
31
+ "width": "",
32
+ "class": "",
33
+ "id": ""
34
+ },
35
+ "return_format": "url",
36
+ "preview_size": "medium",
37
+ "library": "all",
38
+ "min_width": "",
39
+ "min_height": "",
40
+ "min_size": "",
41
+ "max_width": "",
42
+ "max_height": "",
43
+ "max_size": "",
44
+ "mime_types": ""
45
+ },
46
+ {
47
+ "key": "field_5d8c82ae0c1e0",
48
+ "label": "Hover Scroll Speed",
49
+ "name": "acfb_scrollable_image_hover_scroll_speed",
50
+ "type": "range",
51
+ "instructions": "",
52
+ "required": 0,
53
+ "conditional_logic": 0,
54
+ "wrapper": {
55
+ "width": "",
56
+ "class": "",
57
+ "id": ""
58
+ },
59
+ "default_value": 5,
60
+ "min": 1,
61
+ "max": 10,
62
+ "step": "",
63
+ "prepend": "",
64
+ "append": ""
65
+ },
66
+ {
67
+ "key": "field_5d8c810ae990b",
68
+ "label": "Image Height",
69
+ "name": "acfb_scrollable_image_height",
70
+ "type": "range",
71
+ "instructions": "",
72
+ "required": 0,
73
+ "conditional_logic": 0,
74
+ "wrapper": {
75
+ "width": "",
76
+ "class": "",
77
+ "id": ""
78
+ },
79
+ "default_value": 400,
80
+ "min": "",
81
+ "max": 1000,
82
+ "step": "",
83
+ "prepend": "",
84
+ "append": "px"
85
+ },
86
+ {
87
+ "key": "field_5d8c8067e9909",
88
+ "label": "Design",
89
+ "name": "",
90
+ "type": "tab",
91
+ "instructions": "",
92
+ "required": 0,
93
+ "conditional_logic": 0,
94
+ "wrapper": {
95
+ "width": "",
96
+ "class": "",
97
+ "id": ""
98
+ },
99
+ "placement": "top",
100
+ "endpoint": 0
101
+ },
102
+ {
103
+ "key": "field_5d8dc16b02275",
104
+ "label": "No options available here yet.",
105
+ "name": "",
106
+ "type": "message",
107
+ "instructions": "",
108
+ "required": 0,
109
+ "conditional_logic": 0,
110
+ "wrapper": {
111
+ "width": "",
112
+ "class": "",
113
+ "id": ""
114
+ },
115
+ "message": "",
116
+ "new_lines": "wpautop",
117
+ "esc_html": 0
118
+ }
119
+ ],
120
+ "location": [
121
+ [
122
+ {
123
+ "param": "block",
124
+ "operator": "==",
125
+ "value": "acf\/acfb-scrollable-image"
126
+ }
127
+ ]
128
+ ],
129
+ "menu_order": 0,
130
+ "position": "normal",
131
+ "style": "default",
132
+ "label_placement": "top",
133
+ "instruction_placement": "label",
134
+ "hide_on_screen": "",
135
+ "active": 1,
136
+ "description": "",
137
+ "modified": 1569571224
138
+ }
block-templates/scrollable-image.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $uid = $block['id'];
3
+
4
+ $className = 'acfb_scrollable_image_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
+ <div class="<?php echo $uid; ?> <?php echo esc_attr($className); ?>">
14
+ <style type="text/css">
15
+ .<?php echo $uid; ?> .acfb_scrollable_image{
16
+ min-height: <?php the_field('acfb_scrollable_image_height'); ?>px;
17
+ }
18
+
19
+ .<?php echo $uid; ?> .acfb_scrollable_image:hover{
20
+ transition: background-position <?php the_field('acfb_scrollable_image_hover_scroll_speed'); ?>s linear 0s;
21
+ }
22
+ </style>
23
+
24
+ <?php
25
+ $acfb_image = '';
26
+ if(!get_field('acfb_scrollable_image')){
27
+ $acfb_image = plugin_dir_url( __FILE__ ) . '../img/placeholder-vertical.jpg';
28
+ } else{
29
+ $acfb_image = get_field('acfb_scrollable_image');
30
+ }
31
+ ?>
32
+
33
+ <div class="acfb_scrollable_image" style="background-image: url('<?php echo $acfb_image; ?>')"></div>
34
+
35
+ </div><!-- Uid -->
css/acfblocks.css CHANGED
@@ -889,4 +889,19 @@ svg.acfb_social_icons path {
889
 
890
  .acfb_accordion_block .acfb_accordion .acfb_accordion_content .acfb_accordion_content_inner{
891
  display: flex;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
892
  }
889
 
890
  .acfb_accordion_block .acfb_accordion .acfb_accordion_content .acfb_accordion_content_inner{
891
  display: flex;
892
+ }
893
+
894
+
895
+
896
+
897
+ /************ Scrollable Image CSS ************/
898
+ .acfb_scrollable_image{
899
+ transition: background-position 1.5s ease-out 0.5s;
900
+ background-position: top center;
901
+ background-repeat: no-repeat;
902
+ background-size: 100%;
903
+ }
904
+
905
+ .acfb_scrollable_image:hover{
906
+ background-position: bottom center!important;
907
  }
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === ACF Blocks The Ultimate Gutenberg Blocks Suite ===
2
  Contributors: munirkamal
3
- 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.5.0
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -18,9 +18,10 @@ 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>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>
@@ -36,11 +37,29 @@ ACF Blocks is a collection of ready-to-use Gutenberg Blocks for WordPress. Super
36
  <li>Click to tweet Block</li>
37
  </ul>
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  <strong>Many More Blocks On The Way!</strong>
40
 
41
  Visit <a href="https://www.acfblocks.com/?utm_source=wp-repo&utm_medium=link&utm_campaign=readme" target="_blank" rel="">ACF Blocks</a> for more info.
42
 
43
- <strong>Important Note:</strong> ACF Blocks is built on-top of Advanced Custom Fields Pro. This plugin requires ACF Pro to function correctly.
44
 
45
  == Installation ==
46
 
@@ -68,8 +87,21 @@ ACF Blocks should work with any Gutenberg compatible WordPress theme.
68
 
69
  Absolutely! You can definitely use the ACF Blocks on yours as well as your client’s websites. It's FREE!
70
 
 
 
 
 
 
 
 
 
 
 
71
  == Changelog ==
72
 
 
 
 
73
  = 1.5.0 =
74
  * New: Tab Block Added
75
  * New: Toggle Block Added
1
+ === Gutenberg Blocks - ACF Blocks Suite ===
2
  Contributors: munirkamal
3
+ Tags: block, acf block, editor, gutenberg, acf, gutenberg blocks
4
  Requires at least: 4.7
5
  Requires PHP: 5.6
6
  Tested up to: 5.2
7
+ Stable tag: 1.6.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>Scrollable Image (New)</li>
22
  <li>Tab Block (New)</li>
23
  <li>Toggle Block (New)</li>
24
+ <li>Accordion Block</li>
25
  <li>Image Slider Block</li>
26
  <li>Social Sharing Block</li>
27
  <li>Photo Collage Block</li>
37
  <li>Click to tweet Block</li>
38
  </ul>
39
 
40
+ == ACF Blocks Pro is Coming Soon ==
41
+
42
+ We’re speedily developing it right now. ACF Blocks Pro is going to bring more amazing Gutenberg blocks and power it up with features that will make it the best #ACFBlocks suite. You will also get premium support with the Pro.
43
+
44
+ <strong>Have a Sneak-peek into what's coming to Pro.</strong>
45
+
46
+ <ul>
47
+ <li>Flip Box Block</li>
48
+ <li>Timeline Block</li>
49
+ <li>Image Accordion Block</li>
50
+ <li>Call To Action Block</li>
51
+ <li>Before After Image Block</li>
52
+ <li>Image Hotspot Block</li>
53
+ <li>Gallery Block</li>
54
+ </ul>
55
+
56
+ Subscribe to our early access list to get a huge early bird discounted and get notified with the progress and launch. <a href="http://acfblocks.com/pro" target="_blank" rel="">Visit ACF Blocks Pro</a>.
57
+
58
  <strong>Many More Blocks On The Way!</strong>
59
 
60
  Visit <a href="https://www.acfblocks.com/?utm_source=wp-repo&utm_medium=link&utm_campaign=readme" target="_blank" rel="">ACF Blocks</a> for more info.
61
 
62
+ <strong>Important Note:</strong> ACF Blocks is built on-top of Advanced Custom Fields Pro. This plugin (Free Version) requires ACF Pro to function correctly.
63
 
64
  == Installation ==
65
 
87
 
88
  Absolutely! You can definitely use the ACF Blocks on yours as well as your client’s websites. It's FREE!
89
 
90
+ == Screenshots ==
91
+
92
+ 1. Acf Blocks
93
+
94
+ 2. Slider Block
95
+
96
+ 3. Photo Collage Block
97
+
98
+ 4. Posts Block
99
+
100
  == Changelog ==
101
 
102
+ = 1.6.0 =
103
+ * New: Scrollable Image Block Added
104
+
105
  = 1.5.0 =
106
  * New: Tab Block Added
107
  * New: Toggle Block Added