From b29ea455e80082b884a4a34fc6205a8fb9fee975 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 15 Aug 2020 13:45:06 +0000 Subject: [PATCH] Menus: Make the `$object_id` parameter of `_wp_delete_post_menu_item()` required, for consistency with `_wp_delete_tax_menu_item()`. The function is private (only intended for core usage) and is hooked to the `delete_post` action, which always passes a non-zero post ID. Follow-up to [14295], [48794]. See #50343. Built from https://develop.svn.wordpress.org/trunk@48795 git-svn-id: http://core.svn.wordpress.org/trunk@48557 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/nav-menu.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/nav-menu.php b/wp-includes/nav-menu.php index 220f250e0b..f7ceb7cf2b 100644 --- a/wp-includes/nav-menu.php +++ b/wp-includes/nav-menu.php @@ -1038,7 +1038,7 @@ function wp_get_associated_nav_menu_items( $object_id = 0, $object_type = 'post_ * * @param int $object_id The ID of the original object being trashed. */ -function _wp_delete_post_menu_item( $object_id = 0 ) { +function _wp_delete_post_menu_item( $object_id ) { $object_id = (int) $object_id; $menu_item_ids = wp_get_associated_nav_menu_items( $object_id, 'post_type' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 51adf874db..5dccdf5322 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-48794'; +$wp_version = '5.6-alpha-48795'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.