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