Make WordPress Core


Ignore:
Timestamp:
02/05/2020 07:41:08 AM (5 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-walker-nav-menu-edit.php

    r47189 r47190  
    228228                </p>
    229229
     230                <?php
     231                /**
     232                 * Fires just before the move buttons of a nav menu item in the menu editor.
     233                 *
     234                 * @since 5.4.0
     235                 *
     236                 * @param int      $item_id Menu item ID.
     237                 * @param WP_Post  $item    Menu item data object.
     238                 * @param int      $depth   Depth of menu item. Used for padding.
     239                 * @param stdClass $args    An object of menu item arguments.
     240                 * @param int      $id      Nav menu ID.
     241                 */
     242                do_action( 'wp_nav_menu_item_custom_fields', $item_id, $item, $depth, $args, $id );
     243                ?>
     244
    230245                <fieldset class="field-move hide-if-no-js description description-wide">
    231246                    <span class="field-move-visual-label" aria-hidden="true"><?php _e( 'Move' ); ?></span>
Note: See TracChangeset for help on using the changeset viewer.