Skip to:
Content

BuddyPress.org

Changeset 12780


Ignore:
Timestamp:
11/11/2020 06:11:10 PM (2 months ago)
Author:
imath
Message:

Prevent a PHP 8.0 deprecated notice about optional function argument

The bp_admin_get_wp_nav_menu_items() funciton was introduced in 7.0.0 to fix an issue with the BuddyPress Members WP Nav Menu items. It was wrongly using an optional argument before a required one. As PHP 8.0 no longer accepts this practice, both arguments of the function will be required 😇.

Fixes #8390

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/admin/bp-core-admin-functions.php

    r12725 r12780  
    771771 * @return array   The BP Member nav items to short-circuit WP's query,
    772772 */
    773 function bp_admin_get_wp_nav_menu_items( $null = null, $wp_query ) {
     773function bp_admin_get_wp_nav_menu_items( $null, $wp_query ) {
    774774    if ( isset( $wp_query->query['orderby'], $wp_query->query['order'] ) && 'post_date' === $wp_query->query['orderby'] && 'DESC' === $wp_query->query['order'] ) {
    775775        return bp_nav_menu_get_loggedin_pages();
Note: See TracChangeset for help on using the changeset viewer.