wphooks.info - wp_create_nav_menu

wp_create_nav_menu

(trunk - 5.0-alpha-42993)

The hook occurs in the following file:

wp-includes/nav-menu.php:
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
		}

		/**
		 * Fires after a navigation menu is successfully created.
		 *
		 * @since 3.0.0
		 *
		 * @param int   $term_id   ID of the new menu.
		 * @param array $menu_data An array of menu data.
		 */
		do_action( 'wp_create_nav_menu', $_menu['term_id'], $menu_data );

		return (int) $_menu['term_id'];
	}

	if ( ! $_menu || ! isset( $_menu->term_id ) ) {
		return 0;
	}

	$menu_id = (int) $_menu->term_id;