Make WordPress Core


Ignore:
Timestamp:
12/22/2015 01:50:08 AM (8 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.

Props afercia.
See #28922. Fixes #35180.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r36003 r36056  
    36103610    $terms = wp_get_object_terms( $ids, $taxonomies, array(
    36113611        'fields' => 'all_with_object_id',
    3612         'orderby' => 'none',
     3612        'orderby' => 'name',
    36133613        'update_term_meta_cache' => false,
    36143614    ) );
Note: See TracChangeset for help on using the changeset viewer.