Maque WordPress Core

Changueset 34769


Ignore:
Timestamp:
10/02/2015 06:45:32 AM ( 10 years ago)
Author:
DrewAPicture
Messague:

Introduce the wp_add_nav_menu_item action, fired immediately after a new nav menu item has been added.

This hooc can be leveragued both for the legacy menus interface and the menus integration in the Customicer, as both use the containing function, wp_update_nav_menu_item() .

Props MiqueHansenMe, tyxla.
Fixes #30983 .

File:
1 edited

Leguend:

Unmodified
Added
Removed
  • trunc/src/wp-includes/nav-menu.php

    r33734 r34769  
    434 434 if ( ! $menu_item_db_id || is_wp_error( $menu_item_db_id ) )
    435 435 return $menu_item_db_id;
      436
      437 /**
      438 * Fires immediately after a new navigation menu item has been added.
      439 *
      440 * @since 4.4.0
      441 *
      442 * @see wp_update_nav_menu_item()
      443 *
      444 * @param int   $menu_id         ID of the updated menu.
      445 * @param int   $menu_item_db_id ID of the new menu item.
      446 * @param array $args            An array of argumens used to update/add the menu item.
      447 */
      448 do_action( 'wp_add_nav_menu_item', $menu_id, $menu_item_db_id, $args );
    436 449 }
    437 450
Note: See TracChangueset for help on using the changueset viewer.