wp-cli/entity-command(新しいタブで開きます)
主要言語: PHP
Manage WordPress comments, menus, options, posts, sites, terms, and users.
- star 数
- 105
- watcher 数
- 4
- fork 数
- 98
- issue 数
- 19
- 最終更新
- 2026/10/31
主要言語: PHP
Manage WordPress comments, menus, options, posts, sites, terms, and users.
Manage WordPress comments, menus, options, posts, sites, terms, and users.
Quick links: Using | Installing | Contributing | Support
This package implements the following commands:
Creates, updates, deletes, and moderates comments.
wp comment
EXAMPLES
# Create a new comment.
$ wp comment create --comment_post_ID=15 --comment_content="hello blog" --comment_author="wp-cli"
Success: Created comment 932.
# Update an existing comment.
$ wp comment update 123 --comment_author='That Guy'
Success: Updated comment 123.
# Delete an existing comment.
$ wp comment delete 1337 --force
Success: Deleted comment 1337.
# Trash all spam comments.
$ wp comment delete $(wp comment list --status=spam --format=ids)
Success: Trashed comment 264.
Success: Trashed comment 262.
# Create a note for a block (WordPress 6.9+).
$ wp comment create --comment_post_ID=15 --comment_content="This block needs revision" --comment_author="editor" --comment_type="note"
Success: Created comment 945.
# List notes for a specific post (WordPress 6.9+).
$ wp comment list --type=note --post_id=15
+------------+---------------------+----------------------------------+
| comment_ID | comment_date | comment_content |
+------------+---------------------+----------------------------------+
| 945 | 2024-11-10 14:30:00 | This block needs revision |
+------------+---------------------+----------------------------------+
# Reply to a note (WordPress 6.9+).
$ wp comment create --comment_post_ID=15 --comment_content="Updated per feedback" --comment_author="editor" --comment_type="note" --comment_parent=945
Success: Created comment 946.
# Resolve a note by adding a comment with status meta (WordPress 6.9+).
$ wp comment create --comment_post_ID=15 --comment_content="Resolving" --comment_author="editor" --comment_type="note" --comment_parent=945 --porcelain
947
$ wp comment meta add 947 _wp_note_status resolved
Success: Added custom field.
# Reopen a resolved note (WordPress 6.9+).
$ wp comment create --comment_post_ID=15 --comment_content="Reopening for further review" --comment_author="editor" --comment_type="note" --comment_parent=945 --porcelain
948
$ wp comment meta add 948 _wp_note_status reopen
Success: Added custom field.
Approves a comment.
wp comment approve <id>...
OPTIONS
<id>...
The IDs of the comments to approve.
EXAMPLES
# Approve comment.
$ wp comment approve 1337
Success: Approved comment 1337.
Counts comments, on whole blog or on a given post.
wp comment count [<post-id>]
OPTIONS
[<post-id>]
The ID of the post to count comments in.
EXAMPLES
# Count comments on whole blog.
$ wp comment count
approved: 33
spam: 3
trash: 1
post-trashed: 0
all: 34
moderated: 1
total_comments: 37
# Count comments in a post.
$ wp comment count 42
approved: 19
spam: 0
trash: 0
post-trashed: 0
all: 19
moderated: 0
total_comments: 19
Creates a new comment.
wp comment create [--comment_agent=<comment_agent>] [--comment_approved=<comment_approved>] [--comment_author=<comment_author>] [--comment_author_email=<comment_author_email>] [--comment_author_IP=<comment_author_IP>] [--comment_author_url=<comment_author_url>] [--comment_content=<comment_content>] [--comment_date=<yyyy-mm-dd-hh-ii-ss>] [--comment_date_gmt=<yyyy-mm-dd-hh-ii-ss>] [--comment_karma=<comment_karma>] [--comment_parent=<comment_parent>] [--comment_post_ID=<comment_post_ID>] [--comment_type=<comment_type>] [--comment_meta=<comment_meta>] [--user_id=<user_id>] [--<field>=<value>] [--porcelain]
OPTIONS
[--comment_agent=<comment_agent>]
The HTTP user agent of the comment author.
[--comment_approved=<comment_approved>]
Whether the comment has been approved. Default 1.
[--comment_author=<comment_author>]
The name of the author of the comment.
[--comment_author_email=<comment_author_email>]
The email address of the comment author.
[--comment_author_IP=<comment_author_IP>]
The IP address of the comment author.
[--comment_author_url=<comment_author_url>]
The URL address of the comment author.
[--comment_content=<comment_content>]
The content of the comment.
[--comment_date=<yyyy-mm-dd-hh-ii-ss>]
The date the comment was submitted.
[--comment_date_gmt=<yyyy-mm-dd-hh-ii-ss>]
The date the comment was submitted in the GMT timezone.
[--comment_karma=<comment_karma>]
The karma of the comment. Default 0.
[--comment_parent=<comment_parent>]
ID of this comment's parent, if any. Default 0.
[--comment_post_ID=<comment_post_ID>]
ID of the post that relates to the comment, if any.
[--comment_type=<comment_type>]
Comment type. Default 'comment'.
[--comment_meta=<comment_meta>]
Array in JSON format of comment meta values keyed by their comment meta key.
[--user_id=<user_id>]
ID of the user who submitted the comment. Default 0.
[--<field>=<value>]
Associative args for the new comment. See wp_insert_comment().
[--porcelain]
Output just the new comment id.
EXAMPLES
# Create comment.
$ wp comment create --comment_post_ID=15 --comment_content="hello blog" --comment_author="wp-cli"
Success: Created comment 932.
# Create a note (WordPress 6.9+).
$ wp comment create --comment_post_ID=15 --comment_content="This block needs revision" --comment_author="editor" --comment_type="note"
Success: Created comment 933.
Deletes a comment.
wp comment delete <id>... [--force]
OPTIONS
<id>...
One or more IDs of comments to delete.
[--force]
Skip the trash bin.
EXAMPLES
# Delete comment.
$ wp comment delete 1337 --force
Success: Deleted comment 1337.
# Delete multiple comments.
$ wp comment delete 1337 2341 --force
Success: Deleted comment 1337.
Success: Deleted comment 2341.
Verifies whether a comment exists.
wp comment exists <id>
Displays a success message if the comment does exist.
OPTIONS
<id>
The ID of the comment to check.
EXAMPLES
# Check whether comment exists.
$ wp comment exists 1337
Success: Comment with ID 1337 exists.
Generates some number of new dummy comments.
wp comment generate [--count=<number>] [--post_id=<post-id>] [--format=<format>]
Creates a specified number of new comments with dummy data.
OPTIONS
[--count=<number>]
How many comments to generate?
---
default: 100
---
[--post_id=<post-id>]
Assign comments to a specific post.
[--format=<format>]
Render output in a particular format.
---
default: progress
options:
- progress
- ids
---
EXAMPLES
# Generate comments for the given post.
$ wp comment generate --format=ids --count=3 --post_id=123
138 139 140
# Add meta to every generated comment.
$ wp comment generate --format=ids --count=3 | xargs -d ' ' -I % wp comment meta add % foo bar
Success: Added custom field.
Success: Added custom field.
Success: Added custom field.
Gets the data of a single comment.
wp comment get <id> [--field=<field>] [--fields=<fields>] [--format=<format>]
OPTIONS
<id>
The comment to get.
[--field=<field>]
Instead of returning the whole comment, returns the value of a single field.
[--fields=<fields>]
Limit the output to specific fields. Defaults to all fields.
[--format=<format>]
Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- yaml
---
EXAMPLES
# Get comment.
$ wp comment get 21 --field=content
Thanks for all the comments, everyone!
Gets a list of comments.
wp comment list [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>]
Display comments based on all arguments supported by WP_Comment_Query().
OPTIONS
[--<field>=<value>]
One or more args to pass to WP_Comment_Query.
[--field=<field>]
Prints the value of a single field for each comment.
[--fields=<fields>]
Limit the output to specific object fields.
[--format=<format>]
Render output in a particular format.
---
default: table
options:
- table
- ids
- csv
- json
- count
- yaml
---
AVAILABLE FIELDS
These fields will be displayed by default for each comment:
These fields are optionally available:
EXAMPLES
# List comment IDs.
$ wp comment list --field=ID
22
23
24
# List comments of a post.
$ wp comment list --post_id=1 --fields=ID,comment_date,comment_author
+------------+---------------------+----------------+
| comment_ID | comment_date | comment_author |
+------------+---------------------+----------------+
| 1 | 2015-06-20 09:00:10 | Mr WordPress |
+------------+---------------------+----------------+
# List approved comments.
$ wp comment list --number=3 --status=approve --fields=ID,comment_date,comment_author
+------------+---------------------+----------------+
| comment_ID | comment_date | comment_author |
+------------+---------------------+----------------+
| 1 | 2015-06-20 09:00:10 | Mr WordPress |
| 30 | 2013-03-14 12:35:07 | John Doe |
| 29 | 2013-03-14 11:56:08 | Jane Doe |
+------------+---------------------+----------------+
# List unapproved comments.
$ wp comment list --number=3 --status=hold --fields=ID,comment_date,comment_author
+------------+---------------------+----------------+
| comment_ID | comment_date | comment_author |
+------------+---------------------+----------------+
| 8 | 2023-11-10 13:13:06 | John Doe |
| 7 | 2023-11-10 13:09:55 | Mr WordPress |
| 9 | 2023-11-10 11:22:31 | Jane Doe |
+------------+---------------------+----------------+
# List comments marked as spam.
$ wp comment list --status=spam --fields=ID,comment_date,comment_author
+------------+---------------------+----------------+
| comment_ID | comment_date | comment_author |
+------------+---------------------+----------------+
| 2 | 2023-11-10 11:22:31 | Jane Doe |
+------------+---------------------+----------------+
# List comments in trash.
$ wp comment list --status=trash --fields=ID,comment_date,comment_author
+------------+---------------------+----------------+
| comment_ID | comment_date | comment_author |
+------------+---------------------+----------------+
| 3 | 2023-11-10 11:22:31 | John Doe |
+------------+---------------------+----------------+
# List notes for a specific post (WordPress 6.9+).
$ wp comment list --type=note --post_id=15 --fields=ID,comment_date,comment_content
+------------+---------------------+----------------------------------+
| comment_ID | comment_date | comment_content |
+------------+---------------------+----------------------------------+
| 10 | 2024-11-10 14:30:00 | This block needs revision |
| 11 | 2024-11-10 15:45:00 | Updated per feedback |
+------------+---------------------+----------------------------------+
Adds, updates, deletes, and lists comment custom fields.
wp comment meta
EXAMPLES
# Set comment meta
$ wp comment meta set 123 description "Mary is a WordPress developer."
Success: Updated custom field 'description'.
# Get comment meta
$ wp comment meta get 123 description
Mary is a WordPress developer.
# Update comment meta
$ wp comment meta update 123 description "Mary is an awesome WordPress developer."
Success: Updated custom field 'description'.
# Delete comment meta
$ wp comment meta delete 123 description
Success: Deleted custom field.
Add a meta field.
wp comment meta add <id> <key> [<value>] [--format=<format>]
OPTIONS
<id>
The ID of the object.
<key>
The name of the meta field to create.
[<value>]
The value of the meta field. If omitted, the value is read from STDIN.
[--format=<format>]
The serialization format for the value.
---
default: plaintext
options:
- plaintext
- json
---
Delete a meta field.
wp comment meta delete <id> [<key>] [<value>] [--all]
OPTIONS
<id>
The ID of the object.
[<key>]
The name of the meta field to delete.
[<value>]
The value to delete. If omitted, all rows with key will deleted.
[--all]
Delete all meta for the object.
Get meta field value.
wp comment meta get <id> <key> [--single] [--format=<format>]
OPTIONS
<id>
The ID of the object.
<key>
The name of the meta field to get.
[--single]
Whether to return a single value.
[--format=<format>]
Get value in a particular format.
---
default: var_export
options:
- var_export
- json
- yaml
---
List all metadata associated with an object.
wp comment meta list <id> [--keys=<keys>] [--fields=<fields>] [--format=<format>] [--orderby=<fields>] [--order=<order>] [--unserialize]
OPTIONS
<id>
ID for the object.
[--keys=<keys>]
Limit output to metadata of specific keys.
[--fields=<fields>]
Limit the output to specific row fields. Defaults to id,meta_key,meta_value.
[--format=<format>]
Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- yaml
- count
---
[--orderby=<fields>]
Set orderby which field.
---
default: id
options:
- id
- meta_key
- meta_value
---
[--order=<order>]
Set ascending or descending order.
---
default: asc
options:
- asc
- desc
---
[--unserialize]
Unserialize meta_value output.
Update a nested value for a meta field.
wp comment meta patch <action> <id> <key> <key-path>... [<value>] [--format=<format>]
OPTIONS
<action>
Patch action to perform.
---
options:
- insert
- update
- delete
---
<id>
The ID of the object.
<key>
The name of the meta field to update.
<key-path>...
The name(s) of the keys within the value to locate the value to patch.
[<value>]
The new value. If omitted, the value is read from STDIN.
[--format=<format>]
The serialization format for the value.
---
default: plaintext
options:
- plaintext
- json
---
Get a nested value from a meta field.
wp comment meta pluck <id> <key> <key-path>... [--format=<format>]
OPTIONS
<id>
The ID of the object.
<key>
The name of the meta field to get.
<key-path>...
The name(s) of the keys within the value to locate the value to pluck.
[--format=<format>]
The output format of the value.
---
default: plaintext
options:
- plaintext
- json
- yaml
Update a meta field.
wp comment meta update <id> <key> [<value>] [--format=<format>]
Alias: set
OPTIONS
<id>
The ID of the object.
<key>
The name of the meta field to update.
[<value>]
The new value. If omitted, the value is read from STDIN.
[--format=<format>]
The serialization format for the value.
---
default: plaintext
options:
- plaintext
- json
---
Recalculates the comment_count value for one or more posts.
wp comment recount <id>...
OPTIONS
<id>...
IDs for one or more posts to update.
EXAMPLES
# Recount comment for the post.
$ wp comment recount 123
Updated post 123 comment count to 67.
Marks a comment as spam.
wp comment spam <id>...
OPTIONS
<id>...
The IDs of the comments to mark as spam.
EXAMPLES
# Spam comment.
$ wp comment spam 1337
Success: Marked as spam comment 1337.
Gets the status of a comment.
wp comment status <id>
OPTIONS
<id>
The ID of the comment to check.
EXAMPLES
# Get status of comment.
$ wp comment status 1337
approved
Trashes a comment.
wp comment trash <id>...
OPTIONS
<id>...
The IDs of the comments to trash.
EXAMPLES
# Trash comment.
$ wp comment trash 1337
Success: Trashed comment 1337.
Unapproves a comment.
wp comment unapprove <id>...
OPTIONS
<id>...
The IDs of the comments to unapprove.
EXAMPLES
# Unapprove comment.
$ wp comment unapprove 1337
Success: Unapproved comment 1337.
Unmarks a comment as spam.
wp comment unspam <id>...
OPTIONS
<id>...
The IDs of the comments to unmark as spam.
EXAMPLES
# Unspam comment.
$ wp comment unspam 1337
Success: Unspammed comment 1337.
Untrashes a comment.
wp comment untrash <id>...
OPTIONS
<id>...
The IDs of the comments to untrash.
EXAMPLES
# Untrash comment.
$ wp comment untrash 1337
Success: Untrashed comment 1337.
Updates one or more comments.
wp comment update <id>... [--comment_agent=<comment_agent>] [--comment_approved=<comment_approved>] [--comment_author=<comment_author>] [--comment_author_email=<comment_author_email>] [--comment_author_IP=<comment_author_IP>] [--comment_author_url=<comment_author_url>] [--comment_content=<comment_content>] [--comment_date=<yyyy-mm-dd-hh-ii-ss>] [--comment_date_gmt=<yyyy-mm-dd-hh-ii-ss>] [--comment_karma=<comment_karma>] [--comment_parent=<comment_parent>] [--comment_post_ID=<comment_post_ID>] [--comment_type=<comment_type>] [--comment_meta=<comment_meta>] [--user_id=<user_id>] --<field>=<value>
OPTIONS
<id>...
One or more IDs of comments to update.
[--comment_agent=<comment_agent>]
The HTTP user agent of the comment author.
[--comment_approved=<comment_approved>]
Whether the comment has been approved.
[--comment_author=<comment_author>]
The name of the author of the comment.
[--comment_author_email=<comment_author_email>]
The email address of the comment author.
[--comment_author_IP=<comment_author_IP>]
The IP address of the comment author.
[--comment_author_url=<comment_author_url>]
The URL address of the comment author.
[--comment_content=<comment_content>]
The content of the comment.
[--comment_date=<yyyy-mm-dd-hh-ii-ss>]
The date the comment was submitted.
[--comment_date_gmt=<yyyy-mm-dd-hh-ii-ss>]
The date the comment was submitted in the GMT timezone. Note that
wp_update_comment() always recalculates this from 'comment_date'.
[--comment_karma=<comment_karma>]
The karma of the comment.
[--comment_parent=<comment_parent>]
ID of this comment's parent, if any.
[--comment_post_ID=<comment_post_ID>]
ID of the post that relates to the comment, if any.
[--comment_type=<comment_type>]
Comment type.
[--comment_meta=<comment_meta>]
Array in JSON format of comment meta values keyed by their comment meta key.
[--user_id=<user_id>]
ID of the user who submitted the comment.
--<field>=<value>
One or more fields to update. See wp_update_comment().
EXAMPLES
# Update comment.
$ wp comment update 123 --comment_author='That Guy'
Success: Updated comment 123.
Manages WordPress fonts.
wp font
EXAMPLES
# List all font collections
$ wp font collection list
# Install a font family from a collection
$ wp font family install google-fonts inter
# List installed font families
$ wp post list --post_type=wp_font_family
# List installed font faces
$ wp post list --post_type=wp_font_face
Manages font collections.
wp font collection
Font collections are predefined sets of fonts that can be used in WordPress. Collections are registered by WordPress core or themes and cannot be created or deleted via the command line.
EXAMPLES
# List all font collections
$ wp font collection list
+------------------+-------------------+---------+
| slug | name | count |
+------------------+-------------------+---------+
| google-fonts | Google Fonts | 1500 |
+------------------+-------------------+---------+
# Get details about a specific font collection
$ wp font collection get google-fonts
+-------+------------------+
| Field | Value |
+-------+------------------+
| slug | google-fonts |
| name | Google Fonts |
+-------+------------------+
Gets details about a registered font collection.
wp font collection get <slug> [--field=<field>] [--fields=<fields>] [--format=<format>]
OPTIONS
<slug>
Font collection slug.
[--field=<field>]
Instead of returning the whole collection, returns the value of a single field.
[--fields=<fields>]
Limit the output to specific fields. Defaults to all fields.
[--format=<format>]
Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- yaml
---
AVAILABLE FIELDS
These fields will be displayed by default for the specified collection:
EXAMPLES
# Get details of a specific collection
$ wp font collection get google-fonts
+-------+------------------+
| Field | Value |
+-------+------------------+
| slug | google-fonts |
| name | Google Fonts |
+-------+------------------+
# Get the name field only
$ wp font collection get google-fonts --field=name
Google Fonts
Checks if a font collection is registered.
wp font collection is-registered <slug>
OPTIONS
<slug>
Font collection slug.
EXAMPLES
# Bash script for checking if a font collection is registered, with fallback.
if wp font collection is-registered google-fonts 2>/dev/null; then
# Font collection is registered. Do something.
else
# Fallback if collection is not registered.
fi
Lists registered font collections.
wp font collection list [--field=<field>] [--fields=<fields>] [--format=<format>]
OPTIONS
[--field=<field>]
Prints the value of a single field for each collection.
[--fields=<fields>]
Limit the output to specific collection fields.
[--format=<format>]
Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- count
- yaml
---
AVAILABLE FIELDS
These fields will be displayed by default for each collection:
EXAMPLES
# List all font collections
$ wp font collection list
+------------------+-------------------+
| slug | name |
+------------------+-------------------+
| google-fonts | Google Fonts |
+------------------+-------------------+
# List collections in JSON format
$ wp font collection list --format=json
[{"slug":"google-fonts","name":"Google Fonts"}]
Lists categories in a collection.
wp font collection list-categories <slug> [--field=<field>] [--fields=<fields>] [--format=<format>]
OPTIONS
<slug>
Font collection slug.
[--field=<field>]
Prints the value of a single field for each category.
[--fields=<fields>]
Limit the output to specific category fields.
[--format=<format>]
Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- count
- yaml
---
AVAILABLE FIELDS
EXAMPLES
# List all categories in a collection
$ wp font collection list-categories google-fonts
+-------------+--------------+
| slug | name |
+-------------+--------------+
| sans-serif | Sans Serif |
| display | Display |
+-------------+--------------+
Lists font families in a collection.
wp font collection list-families <slug> [--category=<slug>] [--field=<field>] [--fields=<fields>] [--format=<format>]
OPTIONS
<slug>
Font collection slug.
[--category=<slug>]
Filter by category slug.
[--field=<field>]
Prints the value of a single field for each family.
[--fields=<fields>]
Limit the output to specific family fields.
[--format=<format>]
Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- count
- yaml
---
AVAILABLE FIELDS
EXAMPLES
# List all font families in a collection
$ wp font collection list-families google-fonts
# List font families in a specific category
$ wp font collection list-families google-fonts --category=sans-serif
Manages font faces.
wp font face
To list, get, create, update or delete font faces, use wp post with
--post_type=wp_font_face.
EXAMPLES
# Install a font face for an existing family
$ wp font face install 42 --src="https://example.com/font.woff2" --font-weight=700
Success: Created font face 43.
# List installed font faces
$ wp post list --post_type=wp_font_face
Installs a font face.
wp font face install <family-id> --src=<src> [--font-family=<family>] [--font-style=<style>] [--font-weight=<weight>] [--font-display=<display>] [--porcelain]
Creates a new font face post with the specified settings.
OPTIONS
<family-id>
Font family ID.
--src=<src>
Font face source URL or file path.
[--font-family=<family>]
CSS font-family value.
[--font-style=<style>]
CSS font-style value (e.g., normal, italic).
---
default: normal
---
[--font-weight=<weight>]
CSS font-weight value (e.g., 400, 700).
---
default: 400
---
[--font-display=<display>]
CSS font-display value.
[--porcelain]
Output just the new font face ID.
EXAMPLES
# Install a font face
$ wp font face install 42 --src="https://example.com/font.woff2" --font-weight=700 --font-style=normal
Success: Created font face 43.
# Install a font face with porcelain output
$ wp font face install 42 --src="font.woff2" --porcelain
44
Manages font families.
wp font family
To list, get, create, update or delete font families, use wp post with
--post_type=wp_font_family.
EXAMPLES
# Install a font family from a collection
$ wp font family install google-fonts inter
Success: Installed font family "Inter" (ID: 42) with 9 font faces.
# List installed font families
$ wp post list --post_type=wp_font_family
Installs a font family from a collection.
wp font family install <collection> <family> [--porcelain]
Retrieves a font family from a collection and creates the wp_font_family post along with all associated font faces.
OPTIONS
<collection>
Font collection slug.
<family>
Font family slug from the collection.
[--porcelain]
Output just the new font family ID.
EXAMPLES
# Install a font family from a collection
$ wp font family install google-fonts inter
Success: Installed font family "Inter" (ID: 42) with 9 font faces.
# Install and get the family ID
$ wp font family install google-fonts roboto --porcelain
43
Manages registered SVG icons.
wp icon
Icons are registered in code with wp_register_icon() by WordPress core,
themes, and plugins, and always belong to an icon collection. Because they
only exist for the duration of a request, they cannot be created or deleted
from the command line.
Icon names are namespaced with the slug of the collection they belong to,
in the form collection/icon-name.
EXAMPLES
# List all registered icons
$ wp icon list
+-----------------+------------+------------+
| name | label | collection |
+-----------------+------------+------------+
| core/arrow-down | Arrow Down | core |
| core/plus | Plus | core |
+-----------------+------------+------------+
# Get details about a single icon
$ wp icon get core/plus --fields=name,label,collection
+------------+-----------+
| Field | Value |
+------------+-----------+
| name | core/plus |
| label | Plus |
| collection | core |
+------------+-----------+
# Render an icon at a given size, ready to be embedded in a template
$ wp icon render core/plus --size=48 --label="Add item" > plus.svg
Manages icon collections.
wp icon collection
Icon collections group registered SVG icons by source, and act as the
namespace of the icons belonging to them. WordPress core registers the
core collection, while themes and plugins register their own with
wp_register_icon_collection(). Because collections only exist for the
duration of a request, they cannot be created or deleted from the command
line.
EXAMPLES
# List all icon collections
$ wp icon collection list
+------+-----------+--------------------------+-------+
| slug | label | description | count |
+------+-----------+--------------------------+-------+
| core | WordPress | Default icon collection. | 88 |
+------+-----------+--------------------------+-------+
# List the icons of a collection
$ wp icon list --collection=core
Gets details about a registered icon collection.
wp icon collection get <slug> [--field=<field>] [--fields=<fields>] [--format=<format>]
OPTIONS
<slug>
Icon collection slug.
[--field=<field>]
Instead of returning the whole collection, returns the value of a single field.
[--fields=<fields>]
Limit the outpu