\DevOwl\MultilingualNavMenuList

Get a list of registered and created nav menus and determine their language, too.

Summary

Methods
Properties
Constants
__construct()
getById()
get()
compInstance()
No public properties found
No constants found
getAllCreatedNavMenus()
getLanguagesForMenu()
No protected properties found
N/A
No private methods found
$compLanguage
N/A

Properties

Methods

getById()

getById(string  $id,callable  $checkAlreadyAppliedBy)

See `$this::get()`.

Parameters

string $id
callable $checkAlreadyAppliedBy

get()

get(callable  $checkAlreadyAppliedBy = null)

Get a list of registered and created nav menus and determine their language, too.

Parameters

callable $checkAlreadyAppliedBy

If given, WP_Posts are read for all menus and represented to a boolean in the result. For the new navigation menu it will be only one WP_Post instance be passed which post_content has the Gutenberg blocks inside.

compInstance()

compInstance()

Get compatibility language instance.

getAllCreatedNavMenus()

getAllCreatedNavMenus(): array<mixed,\WP_Term>

Get all created nav menus by iterating all languages.

Returns

array<mixed,\WP_Term>

getLanguagesForMenu()

getLanguagesForMenu(\WP_Term  $menu): array

Get the languages a given menu is assigned to. This can also be multiple.

Parameters

\WP_Term $menu

Returns

array