PHP 클래스 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.
파일 보기
프로젝트 열기: wp-cli/wp-cli
공개 메소드들
메소드 |
설명 |
|
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. |
|
메소드 상세
## 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