PHP Class Menu_Location_Command, wp-cli
## EXAMPLES
# List available menu locations
$ wp menu location list
+----------+-------------------+
| location | description |
+----------+-------------------+
| primary | Primary Menu |
| social | Social Links Menu |
+----------+-------------------+
# Assign the 'primary-menu' menu to the 'primary' location
$ wp menu location assign primary-menu primary
Success: Assigned location to menu.
# Remove the 'primary-menu' menu from the 'primary' location
$ wp menu location remove primary-menu primary
Success: Removed location from menu.
Exibir arquivo
Open project: wp-cli/wp-cli
Public Methods
Method |
Description |
|
assign ( $args, $_ ) |
Assign a location to a menu. |
|
list_ ( $_, $assoc_args ) |
List locations for the current theme. |
|
remove ( $args, $_ ) |
Remove a location from a menu. |
|
Method Details
## OPTIONS
## OPTIONS
[--format=]
: Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- count
- yaml
- ids
---
## AVAILABLE FIELDS
These fields will be displayed by default for each location:
* name
* description
## EXAMPLES
$ wp menu location list
+----------+-------------------+
| location | description |
+----------+-------------------+
| primary | Primary Menu |
| social | Social Links Menu |
+----------+-------------------+
public list_ ( $_, $assoc_args ) |
## OPTIONS