Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/27/2020 10:30:30 PM (7 years ago)
Author:
imath
Message:

Bump PHP required version to 5.6

This commit also tries to fix failing tests with PHP 7.2

Fixes #8172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-walker-nav-menu.php

    r12498 r12552  
    1212
    1313/**
    14  * Compatibility Class to make BP_Walker_Nav_Menu::walk() compatible
    15  * from PHP 5.3 to 5.6 and up.
     14 * Create HTML list of BP nav items.
    1615 *
    17  * @since 5.1.0
     16 * @since 1.7.0
    1817 */
    19 class BP_Walker_Nav_Menu_Compat extends Walker_Nav_Menu {
     18class BP_Walker_Nav_Menu extends Walker_Nav_Menu {
    2019        /**
    2120         * Description of fields indexes for building markup.
     
    133132
    134133        /**
     134         * Overrides Walker::walk() method.
     135         *
     136         * @since 6.0.0 Formalized the existing `...$args` parameter by adding it
     137         *              to the function signature to match WordPress 5.3.
     138         *
     139         * @param array $elements  See {@link Walker::walk()}.
     140         * @param int   $max_depth See {@link Walker::walk()}.
     141         * @param mixed ...$args   See {@link Walker::walk()}.
     142         */
     143        public function walk( $elements, $max_depth, ...$args ) {
     144                return $this->do_walk( $elements, $max_depth, $args );
     145        }
     146
     147        /**
    135148         * Display the current <li> that we are on.
    136149         *
     
    213226        }
    214227}
    215 
    216 if ( PHP_VERSION_ID >= 50600 ) {
    217         require_once dirname( __DIR__ ) . '/compat/php56/class-bp-compat-walker-nav-menu.php';
    218 } else {
    219         require_once dirname( __DIR__ ) . '/compat/php53/class-bp-compat-walker-nav-menu.php';
    220 }
Note: See TracChangeset for help on using the changeset viewer.