WebDevStudios / wd_s

A starter theme from WebDevStudios.
https://wdunderscores.com
GNU General Public License v2.0
664 stars 138 forks source link

Feature/wdsus 7 implement wp cli #1006

Closed guzmandrade-wds closed 1 year ago

guzmandrade-wds commented 1 year ago

Closes #WDSUS-7

Adds initial support for WP-CLI command wp abs create_portable_block.

What type of PR is this? (put an x to all applicable)

Link to test

On a terminal run the following WP-CLI command

wp abs create_portable_block myblock --title='This is myblock' --desc='This block is used for wds.' --keyword='mykeyword' --icon='table-row-before'

Which should create a new folder blocks/myblock (the command will fail if the folder already exists) with block.json and other files used to register the ACF Block.

the block should be available on the block selector under the category WDS Blocks:

Screenshot 2023-06-02 at 4 04 54 PM

Description

Call To Action Example (included in this PR) was created with:

wp abs create_portable_block call-to-action --title='Call to Action' --desc='This block is used for wds.' --keyword='call-to-action' --icon='megaphone'

Edit page:

Screenshot 2023-05-26 at 4 33 56 PM

Frontend and preview:

Screenshot 2023-06-02 at 4 06 39 PM

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

Added tests?

Added to documentation?

Others

[optional] Are there any post-deployment tasks we need to perform?