Changeset 38859 for trunk/src/wp-includes/class-wp-customize-manager.php
- Timestamp:
- 10/21/2016 11:11:42 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r38829 r38859 2506 2506 * 2507 2507 * @since 3.4.0 2508 * @deprecated 4.7.0 Use wp_list_sort() 2508 2509 * 2509 2510 * @param WP_Customize_Panel|WP_Customize_Section|WP_Customize_Control $a Object A. … … 2512 2513 */ 2513 2514 protected function _cmp_priority( $a, $b ) { 2515 _deprecated_function( __METHOD__, '4.7.0', 'wp_list_sort' ); 2516 2514 2517 if ( $a->priority === $b->priority ) { 2515 2518 return $a->instance_number - $b->instance_number; … … 2531 2534 2532 2535 $controls = array(); 2533 uasort( $this->controls, array( $this, '_cmp_priority' ) ); 2536 $this->controls = wp_list_sort( $this->controls, array( 2537 'priority' => 'ASC', 2538 'instance_number' => 'ASC', 2539 ) ); 2534 2540 2535 2541 foreach ( $this->controls as $id => $control ) { … … 2544 2550 2545 2551 // Prepare sections. 2546 uasort( $this->sections, array( $this, '_cmp_priority' ) ); 2552 $this->sections = wp_list_sort( $this->sections, array( 2553 'priority' => 'ASC', 2554 'instance_number' => 'ASC', 2555 ) ); 2547 2556 $sections = array(); 2548 2557 … … 2552 2561 } 2553 2562 2554 usort( $section->controls, array( $this, '_cmp_priority' ) ); 2563 2564 $section->controls = wp_list_sort( $section->controls, array( 2565 'priority' => 'ASC', 2566 'instance_number' => 'ASC', 2567 ) ); 2555 2568 2556 2569 if ( ! $section->panel ) { … … 2567 2580 2568 2581 // Prepare panels. 2569 uasort( $this->panels, array( $this, '_cmp_priority' ) ); 2582 $this->panels = wp_list_sort( $this->panels, array( 2583 'priority' => 'ASC', 2584 'instance_number' => 'ASC', 2585 ) ); 2570 2586 $panels = array(); 2571 2587 … … 2575 2591 } 2576 2592 2577 uasort( $panel->sections, array( $this, '_cmp_priority' ) ); 2593 $panel->sections = wp_list_sort( $panel->sections, array( 2594 'priority' => 'ASC', 2595 'instance_number' => 'ASC', 2596 ) ); 2578 2597 $panels[ $panel->id ] = $panel; 2579 2598 } … … 2582 2601 // Sort panels and top-level sections together. 2583 2602 $this->containers = array_merge( $this->panels, $this->sections ); 2584 uasort( $this->containers, array( $this, '_cmp_priority' ) ); 2603 $this->containers = wp_list_sort( $this->containers, array( 2604 'priority' => 'ASC', 2605 'instance_number' => 'ASC', 2606 ) ); 2585 2607 } 2586 2608
Note: See TracChangeset
for help on using the changeset viewer.