-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c2b4b8c
commit f94bd71
Showing
5 changed files
with
19 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# Changelog | ||
|
||
## [2.0.0] | ||
|
||
Update to utilize Portable Blocks & `block.json` for block registration. Requires ACF 6.0+, WordPress 5.8+ | ||
|
||
## [1.0.0] | ||
|
||
Initial Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Block script. | ||
* | ||
* @package | ||
* @since ?? | ||
* @since 2.0.0 | ||
*/ | ||
import './style.scss'; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,20 +3,20 @@ | |
* Plugin Name: WDS ACF Blocks | ||
* Description: A set of custom Gutenberg blocks built lovingly with Advanced Custom Fields. | ||
* Author: WebDevStudios | ||
* Version: 1.0.0 | ||
* Version: 2.0.0 | ||
* Text Domain: wds-acf-blocks | ||
* Domain Path: /dist/languages/ | ||
* | ||
* @since 1.0 | ||
* @package wds-acf-blocks | ||
*/ | ||
|
||
namespace WebDevStudios\abs; | ||
|
||
// Define a global version number. | ||
define( 'ABS_WDS_ACF_VERSION', '1.0.0' ); | ||
define( 'ABS_WDS_ACF_VERSION', '2.0.0' ); | ||
define( 'ABS_ROOT_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) ); | ||
define( 'ABS_ROOT_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) ); | ||
|
||
/** | ||
* Check to see if ACF Pro is active. | ||
* | ||
|
@@ -63,7 +63,7 @@ function wds_acf_blocks_parent_plugin_notice() { | |
* | ||
* @return void | ||
* @author Jenna Hines | ||
* @since 2022-09-13 | ||
* @since 2.0.0 | ||
*/ | ||
function wds_acf_register_blocks() { | ||
$wds_acf_blocks = glob( plugin_dir_path( __FILE__ ) . 'build/*' ); | ||
|
@@ -79,7 +79,7 @@ function wds_acf_register_blocks() { | |
* | ||
* @return void | ||
* @author Biplav Subedi <[email protected]> | ||
* @since ??? | ||
* @since 2.0.0 | ||
*/ | ||
function include_helper_files() { | ||
$files = [ | ||
|
@@ -97,5 +97,4 @@ function include_helper_files() { | |
} | ||
} | ||
} | ||
|
||
include_helper_files(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Block script. | ||
* | ||
* @package | ||
* @since ?? | ||
* @since 2.0.0 | ||
*/ | ||
import './style.scss'; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ class Blocks_Scaffold { | |
* ## EXAMPLES | ||
* | ||
* wp abs create_portable_block myblock --title="This is myblock" --desc="This block is used for wds." --keywords="myblock" --icon="table-row-before" | ||
* @since ?? | ||
* @since 2.0.0 | ||
* @param string $name The block name. | ||
* @param array $assoc_args The block args. | ||
*/ | ||
|
@@ -93,7 +93,7 @@ public function create_portable_block( $name, $assoc_args ) { | |
/** | ||
* Init file system. | ||
* | ||
* @since ?? | ||
* @since 2.0.0 | ||
*/ | ||
private function init_filesystem() { | ||
// File system support. | ||
|
@@ -108,7 +108,7 @@ private function init_filesystem() { | |
* Create the block directory. | ||
* | ||
* @author Biplav Subedi <[email protected]> | ||
* @since ?? | ||
* @since 2.0.0 | ||
*/ | ||
private function create_block_dir() { | ||
$dir = ABS_ROOT_PATH . 'src/blocks/' . $this->name; | ||
|
@@ -123,7 +123,7 @@ private function create_block_dir() { | |
/** | ||
* Create the block render file. | ||
* | ||
* @since ?? | ||
* @since 2.0.0 | ||
* @author Biplav Subedi <[email protected]> | ||
*/ | ||
private function create_block_render_php() { | ||
|
@@ -139,7 +139,7 @@ private function create_block_render_php() { | |
/** | ||
* Create the block tailwind config file. | ||
* | ||
* @since ?? | ||
* @since 2.0.0 | ||
* @author Biplav Subedi <[email protected]> | ||
*/ | ||
private function create_block_tailwind_config() { | ||
|
@@ -162,7 +162,7 @@ private function create_block_tailwind_config() { | |
* Create the block json. | ||
* | ||
* @param array $args Block details. | ||
* @since ?? | ||
* @since 2.0.0 | ||
* @author Biplav Subedi <[email protected]> | ||
*/ | ||
private function create_block_json( $args ) { | ||
|
@@ -196,7 +196,7 @@ private function create_block_json( $args ) { | |
/** | ||
* Create the block editor styles. | ||
* | ||
* @since ?? | ||
* @since 2.0.0 | ||
* @author Biplav Subedi <[email protected]> | ||
*/ | ||
private function create_block_editor_assets() { | ||
|
@@ -222,7 +222,7 @@ private function create_block_editor_assets() { | |
/** | ||
* Create the block main styles. | ||
* | ||
* @since ?? | ||
* @since 2.0.0 | ||
* @author Biplav Subedi <[email protected]> | ||
*/ | ||
private function create_block_assets() { | ||
|