Skip to content

2.x Menu docs optimizations#2247

Merged
gchtr merged 3 commits into2.x-docs-apifrom
2.x-docs-menu-optimizations
May 18, 2020
Merged

2.x Menu docs optimizations#2247
gchtr merged 3 commits into2.x-docs-apifrom
2.x-docs-menu-optimizations

Conversation

@gchtr
Copy link
Copy Markdown
Member

@gchtr gchtr commented May 10, 2020

Ticket: #2089

Issue

There are some improvements that we can make to the Menu Class Maps.

Solution

According to what was proposed in #2089

  • The menu class map should receive a menu object (a WP_Term) instead of a $location string.
  • Removes the $location parameter from the Menu Item Class Map, because that is already present through $menu->theme_location.
  • Adds more examples for how to use the Menu Class Maps.

Impact

None.

Usage Changes

None.

Considerations

-

Testing

No.

@gchtr gchtr added the 2.0 label May 10, 2020
@gchtr gchtr requested a review from acobster May 10, 2020 12:38
@gchtr gchtr mentioned this pull request May 10, 2020
24 tasks
@jarednova jarednova self-assigned this May 12, 2020
@timber timber deleted a comment from codecov-io May 12, 2020
Copy link
Copy Markdown
Member

@jarednova jarednova left a comment

Choose a reason for hiding this comment

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

@gchtr looks good! I found a few small things to clean up, but your examples were spot-on and very helpful to show not only the code, but ideas on real(ish)-world applications.

@jarednova jarednova assigned gchtr and unassigned jarednova May 12, 2020
@jarednova
Copy link
Copy Markdown
Member

Made a few small changes — back to you for merging!

@gchtr
Copy link
Copy Markdown
Member Author

gchtr commented May 18, 2020

@jarednova Cool, thanks for your improvements! I’ll merge this in then and then work on the documentation about the pages menu.

@gchtr gchtr merged commit 27c92c2 into 2.x-docs-api May 18, 2020
@gchtr gchtr deleted the 2.x-docs-menu-optimizations branch May 18, 2020 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants