From 3a748c573fca3750f4110915ce17b07a2bfaa618 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Tue, 22 Dec 2015 01:53:22 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/branches/4.4@36057 git-svn-id: http://core.svn.wordpress.org/branches/4.4@36022 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 3dcdede818..6aa9cf6b97 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -3607,7 +3607,7 @@ function update_object_term_cache($object_ids, $object_type) { $terms = wp_get_object_terms( $ids, $taxonomies, array( 'fields' => 'all_with_object_id', - 'orderby' => 'none', + 'orderby' => 'name', 'update_term_meta_cache' => false, ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index c0f5267e65..56a808c396 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4.1-alpha-36052'; +$wp_version = '4.4.1-alpha-36057'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.