- Timestamp:
- 10/21/2016 11:11:42 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/customize/class-wp-customize-nav-menu-setting.php
r37539 r38859 288 288 // Make sure the menu objects get re-sorted after an update/insert. 289 289 if ( ! $is_delete && ! empty( $args['orderby'] ) ) { 290 $this->_current_menus_sort_orderby = $args['orderby']; 291 usort( $menus, array( $this, '_sort_menus_by_orderby' ) ); 290 $menus = wp_list_sort( $menus, array( 291 $args['orderby'] => 'ASC', 292 ) ); 292 293 } 293 294 // @todo add support for $args['hide_empty'] === true … … 314 315 * 315 316 * @since 4.3.0 317 * @deprecated 4.7.0 Use wp_list_sort() 316 318 * @access protected 319 * 317 320 * @param object $menu1 318 321 * @param object $menu2 … … 322 325 */ 323 326 protected function _sort_menus_by_orderby( $menu1, $menu2 ) { 327 _deprecated_function( __METHOD__, '4.7.0', 'wp_list_sort' ); 328 324 329 $key = $this->_current_menus_sort_orderby; 325 330 return strcmp( $menu1->$key, $menu2->$key );
Note: See TracChangeset
for help on using the changeset viewer.