Skip to content

Implement wp menu command#1008

Merged
scribu merged 23 commits intomasterfrom
menu-command
Apr 9, 2014
Merged

Implement wp menu command#1008
scribu merged 23 commits intomasterfrom
menu-command

Conversation

@danielbachhuber
Copy link
Member

A fresher look at #689

  • wp menu list
  • wp menu create
  • wp menu theme-locations
  • wp menu assign-location
  • wp menu remove-location
  • wp menu delete
  • wp menu item list
  • wp menu item add-<type>
  • wp menu item delete

@jackmcconnell
Copy link

I'm very interested in seeing this feature - when implemented do we need to update wp cli in anyway?

@danielbachhuber
Copy link
Member Author

I'm very interested in seeing this feature

Glad to hear :)

when implemented do we need to update wp cli in anyway?

Yep. When the new version is released, you can just follow the same installation instructions you started with to override your existing version of WP-CLI.

@jackmcconnell
Copy link

Brill, thanks. Is there any easy way to be alerted of new updates that are in master?

@danielbachhuber
Copy link
Member Author

Is there any easy way to be alerted of new updates that are in master?

Your best bet is to follow @wpcli on Twitter. But I think that's a reasonable feature request: #1011

@danielbachhuber
Copy link
Member Author

@scribu Ready for a review here. If you think it's ready to go, just need to add some usage examples in places before merge.

@scribu
Copy link
Member

scribu commented Feb 13, 2014

Seems like wp menu location assign and wp menu location remove would be more consistent than wp menu assign-location and wp menu remove-location, respectively.

Also, what about renaming wp menu theme-locations to wp menu location theme? We could even go for wp menu location list.

@danielbachhuber danielbachhuber added this to the next milestone Apr 9, 2014
@scribu
Copy link
Member

scribu commented Apr 9, 2014

$ wp menu create test
PHP Notice:  Trying to get property of non-object in /Users/User/git/wp-cli/php/commands/menu.php on line 57
  1. Inconsistent naming: wp menu item remove vs. wp menu delete. (Also see wp widget delete)

  2. wp menu delete and wp menu item remove should support deleting multiple elements.

  3. <db-id> in wp menu item * <db-id> could just be <id>, no?

@danielbachhuber
Copy link
Member Author

1-3 have been addressed.

For 4, menus have multiple "ids", so I went with <db-id> to be specific.

scribu pushed a commit that referenced this pull request Apr 9, 2014
Implement `wp menu` command
@scribu scribu merged commit 6dcb810 into master Apr 9, 2014
@scribu scribu deleted the menu-command branch April 9, 2014 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants