src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php 1 location
|
@@ 576-585 (lines=10) @@
|
| 573 |
|
$items = array_filter( $items, '_is_valid_nav_menu_item' ); |
| 574 |
|
} |
| 575 |
|
|
| 576 |
|
if ( ARRAY_A === $args['output'] ) { |
| 577 |
|
$items = wp_list_sort( $items, array( |
| 578 |
|
$args['output_key'] => 'ASC', |
| 579 |
|
) ); |
| 580 |
|
$i = 1; |
| 581 |
|
|
| 582 |
|
foreach ( $items as $k => $item ) { |
| 583 |
|
$items[ $k ]->{$args['output_key']} = $i++; |
| 584 |
|
} |
| 585 |
|
} |
| 586 |
|
|
| 587 |
|
return $items; |
| 588 |
|
} |
src/wp-includes/nav-menu.php 1 location
|
@@ 653-661 (lines=9) @@
|
| 650 |
|
$items = array_filter( $items, '_is_valid_nav_menu_item' ); |
| 651 |
|
} |
| 652 |
|
|
| 653 |
|
if ( ARRAY_A == $args['output'] ) { |
| 654 |
|
$items = wp_list_sort( $items, array( |
| 655 |
|
$args['output_key'] => 'ASC', |
| 656 |
|
) ); |
| 657 |
|
$i = 1; |
| 658 |
|
foreach ( $items as $k => $item ) { |
| 659 |
|
$items[$k]->{$args['output_key']} = $i++; |
| 660 |
|
} |
| 661 |
|
} |
| 662 |
|
|
| 663 |
|
/** |
| 664 |
|
* Filters the navigation menu items being returned. |