WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/22/2015 01:52:41 AM (4 years ago)
Author:
boonebgorges
Message:

Order terms by 'name' when populating object term cache.

[34217] removed the ORDER BY clause from update_object_term_cache(), for
improved performance. But this proved to cause problems in cases where users
were expecting the results of get_the_terms() to be ordered by 'name'. Let's
revert the change for the time being, and look into more disciplined ordering
in a future release.

Merges [36056] to the 4.4 branch.

Props afercia.
See #28922. Fixes #35180.

Location:
branches/4.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.4

  • branches/4.4/src/wp-includes/taxonomy.php

    r36004 r36057  
    36083608    $terms = wp_get_object_terms( $ids, $taxonomies, array(
    36093609        'fields' => 'all_with_object_id',
    3610         'orderby' => 'none',
     3610        'orderby' => 'name',
    36113611        'update_term_meta_cache' => false,
    36123612    ) );
Note: See TracChangeset for help on using the changeset viewer.