Documentation

Navigations
in package

AbstractYes

Navigations Registration class.

Enables the batch registration of navigation menus, simplifying the process of adding and managing multiple navigations throughout a WordPress theme. Utilizes the Navigation module for each menu's registration, ensuring that menus are registered in accordance with WordPress standards and practices.

Tags
see
Navigation

for the Navigation class.

since
1.0.0

Table of Contents

Methods

set()  : void
Registers multiple navigation menus in bulk.

Methods

set()

Registers multiple navigation menus in bulk.

public static set([array<string|int, mixed> $navigations = [] ]) : void

This method simplifies the process of registering custom navigation menus by accepting an associative array of menu locations and descriptions. This allows for a quick and organized setup of multiple menus.

Example usage:

Navigations::set([
    'primary' => 'Primary Menu',
    'footer' => 'Footer Menu',
    ...
]);
Parameters
$navigations : array<string|int, mixed> = []

An associative array of navigation menu locations and their descriptions. The array keys represent the menu location identifiers, while the values are the descriptions for these locations.

Tags
since
1.0.0

        
On this page

Search results