original_string: public static function sort_terms( $terms, $orderby = 'term_id', $order = 'ASC' ) {
  
  		if ( function_exists( 'wp_list_sort' ) ) {
  			$terms = wp_list_sort( $terms, 'term_id', 'ASC' );
  		} else {
  
  			if ( 'name' === $orderby ) {
  				usort( $terms, '_usort_terms_by_name' );
  			} else {
  				usort( $terms, '_usort_terms_by_ID' );
  			}
  
  			if ( 'DESC' === $order ) {
  				$terms = array_reverse( $terms );
  			}
  		}
  
  		return $terms;
  	}
code: public static function sort_terms( $terms, $orderby = 'term_id', $order = 'ASC' ) {
  
  		if ( function_exists( 'wp_list_sort' ) ) {
  			$terms = wp_list_sort( $terms, 'term_id', 'ASC' );
  		} else {
  
  			if ( 'name' === $orderby ) {
  				usort( $terms, '_usort_terms_by_name' );
  			} else {
  				usort( $terms, '_usort_terms_by_ID' );
  			}
  
  			if ( 'DESC' === $order ) {
  				$terms = array_reverse( $terms );
  			}
  		}
  
  		return $terms;
  	}
code_tokens: public static function sort_terms ( $ terms , $ orderby = 'term_id' , $ order = 'ASC' ) { if ( function_exists ( 'wp_list_sort' ) ) { $ terms = wp_list_sort ( $ terms , 'term_id' , 'ASC' ) ; } else { if ( 'name' === $ orderby ) { usort ( $ terms , '_usort_terms_by_name' ) ; } else { usort ( $ terms , '_usort_terms_by_ID' ) ; } if ( 'DESC' === $ order ) { $ terms = array_reverse ( $ terms ) ; } } return $ terms ; }
docstring: Sort Terms.
  
  @since 3.1.0
  
  @param WP_Term[]    $terms Terms array.
  @param string|array $orderby term object key.
  @param string       $order ASC or DESC.
  
  @return WP_Term[]
docstring_tokens: Sort Terms .