wp_nav_locations_listed_per_menu WordPress Filter Hook

The wp_nav_locations_listed_per_menu hook is used to filter the number of locations listed in the menu editor. This hook is useful for plugins that want to add their own custom locations to the menu editor. By default, only the top-level locations are listed in the menu editor. This hook allows plugins to add their own custom locations, which will be listed in the menu editor alongside the default locations.

apply_filters( 'wp_nav_locations_listed_per_menu', int $locations ) #

Filters the number of locations listed per menu in the drop-down select.


Parameters

$locations

(int)Number of menu locations to list. Default 3.


Top ↑

Source

File: wp-admin/nav-menus.php

View on Trac


Top ↑

Changelog

Changelog
VersionDescription
3.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.