Skip to content

Commit f4c986a

Browse files
committed
Add missing command to readme
1 parent a8471b7 commit f4c986a

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,34 @@ WP_Block_Type_Registry.
6262

6363

6464

65+
### wp block type exists
66+
67+
Checks whether a block type is registered.
68+
69+
~~~
70+
wp block type exists <name>
71+
~~~
72+
73+
Exits with return code 0 if the block type exists, 1 if it does not.
74+
75+
**OPTIONS**
76+
77+
<name>
78+
The block type name, including namespace.
79+
80+
**EXAMPLES**
81+
82+
# Check if a block type exists.
83+
$ wp block type exists core/paragraph
84+
Success: Block type 'core/paragraph' is registered.
85+
86+
# Check for a non-existent block type.
87+
$ wp block type exists core/nonexistent
88+
$ echo $?
89+
1
90+
91+
92+
6593
### wp block type list
6694

6795
Lists registered block types.

‎composer.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"commands": [
3131
"block",
3232
"block type",
33+
"block type exists",
3334
"block type list",
3435
"block type get",
3536
"block pattern",

0 commit comments

Comments
 (0)