Changeset 12500
- Timestamp:
- 11/29/2019 06:06:30 AM (5 years ago)
- Location:
- branches/5.0
- Files:
-
- 6 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/Gruntfile.js
r12472 r12500 270 270 }, 271 271 phplint: { 272 good: ['src/**/*.php' ].concat( BP_EXCLUDED_MISC )272 good: ['src/**/*.php', '!src/bp-core/compat/php56/*.php'].concat( BP_EXCLUDED_MISC ) 273 273 }, 274 274 postcss: { -
branches/5.0/src/bp-core/classes/class-bp-walker-nav-menu.php
r11363 r12500 12 12 13 13 /** 14 * Create HTML list of BP nav items. 14 * Compatibility Class to make BP_Walker_Nav_Menu::walk() compatible 15 * from PHP 5.3 to 5.6 and up. 15 16 * 16 * @since 1.7.017 * @since 5.1.0 17 18 */ 18 class BP_Walker_Nav_Menu extends Walker_Nav_Menu { 19 19 class BP_Walker_Nav_Menu_Compat extends Walker_Nav_Menu { 20 20 /** 21 21 * Description of fields indexes for building markup. … … 48 48 * 49 49 * @since 1.7.0 50 * @since 5.1.0 Method was renamed from `walk` to `do_walk` to ensure PHP 5.3 compatibility 50 51 * 51 52 * @see Walker::walk() … … 53 54 * @param array $elements See {@link Walker::walk()}. 54 55 * @param int $max_depth See {@link Walker::walk()}. 56 * @param array $args Optional additional arguments. 55 57 * @return string See {@link Walker::walk()}. 56 58 */ 57 public function walk( $elements, $max_depth ) { 58 $args = array_slice( func_get_args(), 2 ); 59 public function do_walk( $elements, $max_depth, $args = array() ) { 59 60 $output = ''; 60 61 … … 212 213 } 213 214 } 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.