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
This commit is contained in:
Sergey Biryukov 2020-08-15 13:45:06 +00:00
parent d3a3862248
commit b29ea455e8
2 changed files with 2 additions and 2 deletions

View File

@ -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. * @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; $object_id = (int) $object_id;
$menu_item_ids = wp_get_associated_nav_menu_items( $object_id, 'post_type' ); $menu_item_ids = wp_get_associated_nav_menu_items( $object_id, 'post_type' );

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.