Skip to content

Implement new PagesMenu API #2292

@acobster

Description

@acobster

Per discussion on #2089, implement the following:

  • A Timber\PagesMenu class.
  • A timber/pages_menu/classmap filter.
  • A Timber::get_pages_menu() function.
  • A Timber\PagesMenuFactory class - used under the hood in ::get_pages_menu(), calls the timber/pages_menu/classmap filter.
  • Make Menu and MenuItem constructors protected.
  • Draft the relevant documentation as well as the notes in the Upgrade Guide for this.

There is already a test-timber-pages-menu.php test file. We may want to flesh this out with a few more tests, or redesign some of the existing tests.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions