Menus: Introduce `wp_nav_menu_item_custom_fields` action that fires just before the move buttons of a nav menu item in the menu editor.

Props MikeSchinkel, birgire, sebastian.pisula, desrosj, helgatheviking.
Fixes #47056. See #38904, #18584.
Built from https://develop.svn.wordpress.org/trunk@47190


git-svn-id: http://core.svn.wordpress.org/trunk@46990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-02-05 07:43:05 +00:00
parent 84c43d1863
commit 44288356e2
2 changed files with 16 additions and 1 deletions

View File

@ -227,6 +227,21 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
</label>
</p>
<?php
/**
* Fires just before the move buttons of a nav menu item in the menu editor.
*
* @since 5.4.0
*
* @param int $item_id Menu item ID.
* @param WP_Post $item Menu item data object.
* @param int $depth Depth of menu item. Used for padding.
* @param stdClass $args An object of menu item arguments.
* @param int $id Nav menu ID.
*/
do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args, $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>

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.4-alpha-47189';
$wp_version = '5.4-alpha-47190';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.