Documentation

NavMenuList
in package

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

Table of Contents

Properties

$compLanguage  : AbstractSyncPlugin
Abstract language implementation.

Methods

__construct()  : mixed
C'tor.
compInstance()  : mixed
Get compatibility language instance.
get()  : mixed
Get a list of registered and created nav menus and determine their language, too.
getById()  : mixed
See `$this::get()`.
getAllCreatedNavMenus()  : array<string|int, WP_Term>
Get all created nav menus by iterating all languages.
getLanguagesForMenu()  : array<string|int, mixed>
Get the languages a given menu is assigned to. This can also be multiple.

Properties

Methods

compInstance()

Get compatibility language instance.

public compInstance() : mixed

get()

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

public get([callable $checkAlreadyAppliedBy = null ]) : mixed
Parameters
$checkAlreadyAppliedBy : callable = null

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.

getById()

See `$this::get()`.

public getById(string $id, callable $checkAlreadyAppliedBy) : mixed
Parameters
$id : string
$checkAlreadyAppliedBy : callable

getAllCreatedNavMenus()

Get all created nav menus by iterating all languages.

protected getAllCreatedNavMenus() : array<string|int, WP_Term>
Return values
array<string|int, WP_Term>

getLanguagesForMenu()

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

protected getLanguagesForMenu(WP_Term $menu) : array<string|int, mixed>
Parameters
$menu : WP_Term
Return values
array<string|int, mixed>

        
On this page

Search results