Skip to content

Commit 1cf30e7

Browse files
committed
v1.1.0: Version Bump, Prep for WP.org release
1 parent a39eab3 commit 1cf30e7

18 files changed

+305
-19
lines changed

assets/screenshot-1.png

83.1 KB
Loading

assets/screenshot-2.png

69.2 KB
Loading

assets/screenshot-3.gif

712 KB
Loading

build/index.asset.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-edit-site', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '32a6ed106b36ac1be69b');
1+
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-dom-ready', 'wp-edit-post', 'wp-edit-site', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '7222d0a86dcb84c05c6b');

build/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

changelog.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
= 1.1.0 =
2+
* Initial Release

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "viget/viget-blocks-toolkit",
3-
"description": "Simplifying Block Registration and other additional features.",
3+
"description": "Simplifying Block Registration and other block editor related features.",
44
"keywords": [
55
"wordpress",
66
"components",

includes/assets.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ function () {
2929
'vgtbt-editor-scripts',
3030
VGTBT_PLUGIN_URL . 'build/index.js',
3131
$dependencies,
32-
$asset_file['version']
32+
$asset_file['version'],
33+
[ 'in_footer' => true ]
3334
);
3435

3536
wp_register_style(

includes/helpers.php

+8
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ function get_block_fields( string $block_name ): array { // phpcs:ignore
253253
$block_name = "acf/$block_name";
254254
}
255255

256+
if ( ! function_exists( 'acf_get_field_groups' ) ) {
257+
return [];
258+
}
259+
256260
$field_groups = acf_get_field_groups();
257261
$fields = [];
258262

@@ -293,6 +297,10 @@ function get_block_fields( string $block_name ): array { // phpcs:ignore
293297
* @return string
294298
*/
295299
function get_field_property( string $selector, string $property, ?string $group_id = null ): string { // phpcs:ignore
300+
if ( ! function_exists( 'acf_get_fields' ) ) {
301+
return '';
302+
}
303+
296304
if ( null !== $group_id ) {
297305
$fields = acf_get_fields( $group_id );
298306
foreach ( $fields as $field_array ) {

includes/parts-kit.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
* @package VigetBlocksToolkit
66
*/
77

8-
use Viget\BlocksToolkit\Block_Registration;
8+
use Viget\BlocksToolkit\BlockRegistration;
99

1010
add_filter(
1111
'vgtpk_parts_kit_block_%',
1212
function ( string $output, string $block_name ): string {
13-
$block = Block_Registration::get_block( $block_name );
13+
$block = BlockRegistration::get_block( $block_name );
1414

1515
if ( ! $block ) {
1616
return $output;

languages/viget-blocks-toolkit.pot

+204
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
# Copyright (C) 2025 Viget
2+
# This file is distributed under the GPL v2 or later.
3+
msgid ""
4+
msgstr ""
5+
"Project-Id-Version: Viget Blocks Toolkit 1.1.0\n"
6+
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/viget-blocks-toolkit\n"
7+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8+
"Language-Team: LANGUAGE <[email protected]>\n"
9+
"MIME-Version: 1.0\n"
10+
"Content-Type: text/plain; charset=UTF-8\n"
11+
"Content-Transfer-Encoding: 8bit\n"
12+
"POT-Creation-Date: 2025-03-05T18:09:13+00:00\n"
13+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14+
"X-Generator: WP-CLI 2.10.0\n"
15+
"X-Domain: viget-blocks-toolkit\n"
16+
17+
#. Plugin Name of the plugin
18+
#: viget-blocks-toolkit.php
19+
msgid "Viget Blocks Toolkit"
20+
msgstr ""
21+
22+
#. Plugin URI of the plugin
23+
#. Author URI of the plugin
24+
#: viget-blocks-toolkit.php
25+
msgid "https://viget.com"
26+
msgstr ""
27+
28+
#. Description of the plugin
29+
#: viget-blocks-toolkit.php
30+
msgid "Simplifying Block Registration and other additional features."
31+
msgstr ""
32+
33+
#. Author of the plugin
34+
#: viget-blocks-toolkit.php
35+
msgid "Viget"
36+
msgstr ""
37+
38+
#: src/classes/BlockIcons.php:96
39+
msgid "Arrow Left"
40+
msgstr ""
41+
42+
#: src/classes/BlockIcons.php:101
43+
msgid "Arrow Right"
44+
msgstr ""
45+
46+
#: src/classes/BlockIcons.php:105
47+
msgid "Chevron Left"
48+
msgstr ""
49+
50+
#: src/classes/BlockIcons.php:110
51+
msgid "Chevron Left Small"
52+
msgstr ""
53+
54+
#: src/classes/BlockIcons.php:115
55+
msgid "Chevron Right"
56+
msgstr ""
57+
58+
#: src/classes/BlockIcons.php:119
59+
msgid "Chevron Right Small"
60+
msgstr ""
61+
62+
#: src/classes/BlockIcons.php:123
63+
msgid "Cloud"
64+
msgstr ""
65+
66+
#: src/classes/BlockIcons.php:127
67+
msgid "Cloud Upload"
68+
msgstr ""
69+
70+
#: src/classes/BlockIcons.php:131
71+
msgid "Comment Author Avatar"
72+
msgstr ""
73+
74+
#: src/classes/BlockIcons.php:135
75+
msgid "Download"
76+
msgstr ""
77+
78+
#: src/classes/BlockIcons.php:139
79+
msgid "External"
80+
msgstr ""
81+
82+
#: src/classes/BlockIcons.php:143
83+
msgid "External Arrow"
84+
msgstr ""
85+
86+
#: src/classes/BlockIcons.php:147
87+
msgid "Help"
88+
msgstr ""
89+
90+
#: src/classes/BlockIcons.php:151
91+
msgid "Info"
92+
msgstr ""
93+
94+
#: src/classes/BlockIcons.php:155
95+
msgid "Lock Outline"
96+
msgstr ""
97+
98+
#: src/classes/BlockIcons.php:159
99+
msgid "Login"
100+
msgstr ""
101+
102+
#: src/classes/BlockIcons.php:163
103+
msgid "Next"
104+
msgstr ""
105+
106+
#: src/classes/BlockIcons.php:167
107+
msgid "Previous"
108+
msgstr ""
109+
110+
#: src/classes/BlockIcons.php:172
111+
msgid "Shuffle"
112+
msgstr ""
113+
114+
#: src/classes/BlockIcons.php:176
115+
msgid "WordPress"
116+
msgstr ""
117+
118+
#: src/classes/BlockIcons.php:411
119+
#: build/index.js:1
120+
#: src/features/block-icons.js:87
121+
msgid "Icon"
122+
msgstr ""
123+
124+
#. translators: %1$s represents the attribute key, %2$s lists the supported attributes.
125+
#: src/classes/BlockTemplate/Block.php:93
126+
msgid "Unsupported block attribute: %1$s. Must be one of: %2$s"
127+
msgstr ""
128+
129+
#: views/default.php:13
130+
msgid "Default Block template"
131+
msgstr ""
132+
133+
#: views/default.php:19
134+
msgid "Block data available"
135+
msgstr ""
136+
137+
#: views/jsx.php:15
138+
msgid "Type / to choose a block"
139+
msgstr ""
140+
141+
#: build/index.js:1
142+
#: src/features/block-icons.js:118
143+
msgid "Show icon on left"
144+
msgstr ""
145+
146+
#: build/index.js:1
147+
#: src/features/breakpoint-visibility.js:82
148+
msgid "Responsive"
149+
msgstr ""
150+
151+
#: build/index.js:1
152+
#: src/features/breakpoint-visibility.js:87
153+
msgid "Hide on Desktop"
154+
msgstr ""
155+
156+
#: build/index.js:1
157+
#: src/features/breakpoint-visibility.js:93
158+
msgid "Hide on Tablet"
159+
msgstr ""
160+
161+
#: build/index.js:1
162+
#: src/features/breakpoint-visibility.js:99
163+
msgid "Hide on Mobile"
164+
msgstr ""
165+
166+
#: build/index.js:1
167+
#: src/features/breakpoint-visibility.js:108
168+
msgid "Use Custom Breakpoint"
169+
msgstr ""
170+
171+
#: build/index.js:1
172+
#: src/features/breakpoint-visibility.js:122
173+
msgid "Breakpoint Width"
174+
msgstr ""
175+
176+
#: build/index.js:1
177+
#: src/features/breakpoint-visibility.js:129
178+
msgid "Unit"
179+
msgstr ""
180+
181+
#: build/index.js:1
182+
#: src/features/breakpoint-visibility.js:142
183+
msgid "Visibility Action"
184+
msgstr ""
185+
186+
#: build/index.js:1
187+
#: src/features/breakpoint-visibility.js:147
188+
msgid "Show"
189+
msgstr ""
190+
191+
#: build/index.js:1
192+
#: src/features/breakpoint-visibility.js:148
193+
msgid "Hide"
194+
msgstr ""
195+
196+
#: build/index.js:1
197+
#: src/features/breakpoint-visibility.js:151
198+
msgid "Mobile First"
199+
msgstr ""
200+
201+
#: build/index.js:1
202+
#: src/features/breakpoint-visibility.js:152
203+
msgid "When enabled, applies to screens smaller than breakpoint"
204+
msgstr ""

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "viget-blocks-toolkit",
3-
"version": "1.0.9",
3+
"version": "1.1.0",
44
"description": "Custom Block support and button icons.",
55
"author": "Viget",
66
"license": "GPL-2.0-or-later",

packages.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"package": {
33
"name": "viget/viget-blocks-toolkit",
4-
"version": "1.0.9",
4+
"version": "1.1.0",
55
"source": {
66
"url": "/root/path/not/relative/path/to/viget-blocks-toolkit/.git",
77
"type": "git",

readme.txt

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
=== Viget Blocks Toolkit ===
2+
Contributors: viget, briandichiara, nathanschmidt
3+
Tags: blocks,icons,components,editor,acf
4+
Requires at least: 5.7
5+
Tested up to: 6.7.2
6+
Stable tag: 1.1.0
7+
Requires PHP: 8.1
8+
License: GPLv2 or later
9+
License URI: https://www.gnu.org/licenses/gpl-2.0.html
10+
11+
Simplifying Block Registration and other block editor related features.
12+
13+
== Description ==
14+
15+
Enhancements to the block editor as well as simplifying custom block registration with Advanced Custom Fields Pro.
16+
17+
See full features and documentation in the [GitHub README file](https://github.com/vigetlabs/viget-blocks-toolkit).
18+
19+
== Frequently Asked Questions ==
20+
21+
= Is Advanced Custom Fields Pro required? =
22+
23+
No. There are several features of this plugin that can be used without Advanced Custom Fields Pro. However, to utilize the block registration feature, Advanced Custom Fields Pro is required at this time.
24+
25+
== Screenshots ==
26+
27+
1. Block Icons
28+
2. Breakpoint Visibility Settings
29+
3. Media Position Example
30+
31+
== Changelog ==
32+
33+
= 1.1.0 =
34+
* Initial Release

src/classes/BreakpointVisibility.php

+39
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ class BreakpointVisibility {
1818
public function __construct() {
1919
// Add block breakpoint visibility CSS.
2020
self::breakpoint_visibility();
21+
22+
// Localize JS vars.
23+
$this->localize_js_vars();
2124
}
2225

2326
/**
@@ -126,4 +129,40 @@ private static function generate_custom_breakpoint_css(
126129
}
127130
";
128131
}
132+
133+
/**
134+
* Localize JS vars.
135+
*
136+
* @return void
137+
*/
138+
private function localize_js_vars(): void {
139+
add_action(
140+
'enqueue_block_editor_assets',
141+
function () {
142+
wp_localize_script(
143+
'vgtbt-editor-scripts',
144+
'vgtbtBreakpointVisibility',
145+
[
146+
'excludeBlocks' => $this->get_exclude_blocks(),
147+
]
148+
);
149+
},
150+
20
151+
);
152+
}
153+
154+
/**
155+
* Get exclude blocks.
156+
*
157+
* @return array
158+
*/
159+
private function get_exclude_blocks(): array {
160+
return apply_filters(
161+
'vgtbt_breakpoint_visibility_exclude_blocks',
162+
[
163+
'core/rss',
164+
'gravityforms/form',
165+
]
166+
);
167+
}
129168
}

0 commit comments

Comments
 (0)