Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pll menu create command, tests, docs #48

Merged
merged 1 commit into from
Feb 25, 2017
Merged

pll menu create command, tests, docs #48

merged 1 commit into from
Feb 25, 2017

Conversation

diggy
Copy link
Owner

@diggy diggy commented Feb 25, 2017

Create a new menu for each language, AND assign it to a location.

$ wp pll menu create "Primary Menu" primary
Success: Assigned location to menu.
Success: Assigned location to menu.
Success: Assigned location to menu.

$ wp pll menu create "Secondary Menu" secondary --porcelain
21 22 23

@diggy diggy self-assigned this Feb 25, 2017
Copy link
Owner Author

@diggy diggy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good

@diggy diggy merged commit 7097c5f into master Feb 25, 2017
@diggy diggy deleted the wp-pll-menu branch February 25, 2017 23:10
@gbouteiller
Copy link

Great job!!
As I'm new to WP-CLI, I didn't know about runcommand and my code was failing with wp menu location assign main location___language. So thank you, as I understand now how to force wp-cli to do what I want :)

@gbouteiller
Copy link

Hmm, a little question though, how can I know with the result obtained with porcelain which id matches which language?
( I'm using all the commands with Ansible to automate tasks )

@diggy
Copy link
Owner Author

diggy commented Feb 26, 2017

@gbouteiller I'm afraid you'd have to parse the output of wp theme mod get nav_menu_locations:

+--------------------+-------+
| key                | value |
+--------------------+-------+
| nav_menu_locations | =>    |
|     primary        | 53    |
|     primary___de   | 54    |
|     social         | 55    |
|     social___de    | 56    |
+--------------------+-------+

@diggy diggy added this to the v1.0.0-prealpha.1 milestone Mar 2, 2017
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.

2 participants