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. git-svn-id: https://develop.svn.wordpress.org/trunk@48795 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9c220ffaf7
commit
dd071ee278
|
@ -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' );
|
||||
|
|
Loading…
Reference in New Issue