Make WordPress Core


Ignore:
Timestamp:
08/15/2020 01:38:52 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Fix PHP 8 deprecation notices for optional function parameters declared before required parameters.

As it already was not possible to pass the required parameters without also passing the optional one anyway, removing the default value for the (not so) optional parameters should not affect backward compatibility.

This change affects three functions in core:

  • get_comment_delimited_block_content()
  • do_enclose()
  • _wp_delete_tax_menu_item()

Props jrf, ayeshrajans, desrosj.
Fixes #50343.

File:
1 edited

Legend:

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

    r48793 r48794  
    10551055 * @access private
    10561056 *
    1057  * @param int    $object_id Optional. The ID of the original object being trashed. Default 0.
     1057 * @param int    $object_id The ID of the original object being trashed.
    10581058 * @param int    $tt_id     Term taxonomy ID. Unused.
    10591059 * @param string $taxonomy  Taxonomy slug.
    10601060 */
    1061 function _wp_delete_tax_menu_item( $object_id = 0, $tt_id, $taxonomy ) {
     1061function _wp_delete_tax_menu_item( $object_id, $tt_id, $taxonomy ) {
    10621062    $object_id = (int) $object_id;
    10631063
Note: See TracChangeset for help on using the changeset viewer.