mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Cut 'em out, move 'em on, trailing whitespace
git-svn-id: https://develop.svn.wordpress.org/trunk@15116 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2395,7 +2395,7 @@ function _pad_term_counts(&$terms, $taxonomy) {
|
||||
// Get the object and term ids and stick them in a lookup table
|
||||
$tax_obj = get_taxonomy($taxonomy);
|
||||
$object_types = esc_sql($tax_obj->object_type);
|
||||
$results = $wpdb->get_results("SELECT object_id, term_taxonomy_id FROM $wpdb->term_relationships INNER JOIN $wpdb->posts ON object_id = ID WHERE term_taxonomy_id IN (" . implode(',', array_keys($term_ids)) . ") AND post_type IN ('" . implode("', '", $object_types) . "') AND post_status = 'publish'");
|
||||
$results = $wpdb->get_results("SELECT object_id, term_taxonomy_id FROM $wpdb->term_relationships INNER JOIN $wpdb->posts ON object_id = ID WHERE term_taxonomy_id IN (" . implode(',', array_keys($term_ids)) . ") AND post_type IN ('" . implode("', '", $object_types) . "') AND post_status = 'publish'");
|
||||
foreach ( $results as $row ) {
|
||||
$id = $term_ids[$row->term_taxonomy_id];
|
||||
$term_items[$id][$row->object_id] = isset($term_items[$id][$row->object_id]) ? ++$term_items[$id][$row->object_id] : 1;
|
||||
|
||||
Reference in New Issue
Block a user