add_menu_classes WordPress Filter Hook

The add_menu_classes hook allows you to add custom classes to menu items in your Wordpress site. This can be useful for customizing your menu's appearance or for targeting specific menu items with CSS or JavaScript.

apply_filters( 'add_menu_classes', array $menu ) #

Filters administration menu array with classes added for top-level items.


Parameters

$menu

(array)Associative array of administration menu items.


Top ↑

Source

File: wp-admin/includes/menu.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.7.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.