wppaste
WordPress

do_action( 'wp_nav_menu_item_custom_fields', string $item_id, WP_Post $menu_item, int $depth, stdClass|null $args, int $current_object_id )

Since
5.4.0
Fires just before the move buttons of a nav menu item in the menu editor.

Compatibility

WordPress
since 5.4.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$item_idstring
Menu item ID as a numeric string.
$menu_itemWP_Post
Menu item data object.
$depthint
Depth of menu item. Used for padding.
$argsstdClass|null
An object of menu item arguments.
$current_object_idint
Nav menu ID.

Where this hook fires · 1

  • wp-admin/includes/class-walker-nav-menu-edit.php:280Walker_Nav_Menu_Edit::start_el()

Source code

				 * @param string        $item_id           Menu item ID as a numeric string.				 * @param WP_Post       $menu_item         Menu item data object.				 * @param int           $depth             Depth of menu item. Used for padding.				 * @param stdClass|null $args              An object of menu item arguments.				 * @param int           $current_object_id Nav menu ID.				 */				do_action( 'wp_nav_menu_item_custom_fields', $item_id, $menu_item, $depth, $args, $current_object_id );				?> 				<fieldset class="field-move hide-if-no-js description description-wide">					<span class="field-move-visual-label" aria-hidden="true"><?php _e( 'Move' ); ?></span>					<button type="button" class="button-link menus-move menus-move-up" data-dir="up"><?php _e( 'Up one' ); ?></button>					<button type="button" class="button-link menus-move menus-move-down" data-dir="down"><?php _e( 'Down one' ); ?></button>

Changelog

Introduced in 5.4.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.