<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[31087] trunk/src/wp-includes/taxonomy.php: In `wp-includes/taxonomy.php`:</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/31087">31087</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/31087","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>wonderboymusic</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-01-08 06:25:40 +0000 (Thu, 08 Jan 2015)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>In `wp-includes/taxonomy.php`:
The keyword `elseif` should be used instead of `else if` so that all control keywords look like single words.
See <a href="https://core.trac.wordpress.org/ticket/30799">#30799</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludestaxonomyphp">trunk/src/wp-includes/taxonomy.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludestaxonomyphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/taxonomy.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/taxonomy.php 2015-01-08 06:13:05 UTC (rev 31086)
+++ trunk/src/wp-includes/taxonomy.php 2015-01-08 06:25:40 UTC (rev 31087)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -765,7 +765,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $cleaned_query['relation'] = $this->sanitize_relation( $query );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // First-order clause.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( self::is_first_order_clause( $query ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( self::is_first_order_clause( $query ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $cleaned_clause = array_merge( $defaults, $query );
</span><span class="cx" style="display: block; padding: 0 10px"> $cleaned_clause['terms'] = (array) $cleaned_clause['terms'];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -795,7 +795,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Otherwise, it's a nested query, so we recurse.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( is_array( $query ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( is_array( $query ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $cleaned_subquery = $this->sanitize_query( $query );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $cleaned_subquery ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -939,7 +939,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $query as $key => &$clause ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'relation' === $key ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $relation = $query['relation'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( is_array( $clause ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( is_array( $clause ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // This is a first-order clause.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $this->is_first_order_clause( $clause ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -948,7 +948,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $where_count = count( $clause_sql['where'] );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $where_count ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $sql_chunks['where'][] = '';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( 1 === $where_count ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 1 === $where_count ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $sql_chunks['where'][] = $clause_sql['where'][0];
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $sql_chunks['where'][] = '( ' . implode( ' AND ', $clause_sql['where'] ) . ' )';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1393,11 +1393,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $value = sanitize_title($value);
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty($value) )
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( 'name' == $field ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'name' == $field ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Assume already escaped
</span><span class="cx" style="display: block; padding: 0 10px"> $value = wp_unslash($value);
</span><span class="cx" style="display: block; padding: 0 10px"> $field = 't.name';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( 'term_taxonomy_id' == $field ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'term_taxonomy_id' == $field ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $value = (int) $value;
</span><span class="cx" style="display: block; padding: 0 10px"> $field = 'tt.term_taxonomy_id';
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1699,16 +1699,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $_orderby = strtolower( $args['orderby'] );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'count' == $_orderby ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $orderby = 'tt.count';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( 'name' == $_orderby ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'name' == $_orderby ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $orderby = 't.name';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( 'slug' == $_orderby ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'slug' == $_orderby ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $orderby = 't.slug';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( 'include' == $_orderby && ! empty( $args['include'] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'include' == $_orderby && ! empty( $args['include'] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $include = implode( ',', array_map( 'absint', $args['include'] ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $orderby = "FIELD( t.term_id, $include )";
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( 'term_group' == $_orderby ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'term_group' == $_orderby ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $orderby = 't.term_group';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( 'none' == $_orderby ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'none' == $_orderby ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $orderby = '';
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( empty($_orderby) || 'id' == $_orderby ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $orderby = 't.term_id';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2206,7 +2206,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $value = esc_html($value); // textarea_escaped
</span><span class="cx" style="display: block; padding: 0 10px"> else
</span><span class="cx" style="display: block; padding: 0 10px"> $value = esc_attr($value);
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( 'db' == $context ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'db' == $context ) {
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filter a term field value before it is sanitized.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2245,7 +2245,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $value = apply_filters( 'pre_category_nicename', $value );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( 'rss' == $context ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'rss' == $context ) {
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filter the term field for use in RSS.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2302,11 +2302,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $value = apply_filters( "{$taxonomy}_{$field}", $value, $term_id, $context );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'attribute' == $context )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'attribute' == $context ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $value = esc_attr($value);
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- else if ( 'js' == $context )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'js' == $context ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $value = esc_js($value);
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> return $value;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2622,17 +2622,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $order = $args['order'];
</span><span class="cx" style="display: block; padding: 0 10px"> $fields = $args['fields'];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'count' == $orderby )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'count' == $orderby ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $orderby = 'tt.count';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- else if ( 'name' == $orderby )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'name' == $orderby ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $orderby = 't.name';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- else if ( 'slug' == $orderby )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'slug' == $orderby ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $orderby = 't.slug';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- else if ( 'term_group' == $orderby )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'term_group' == $orderby ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $orderby = 't.term_group';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- else if ( 'term_order' == $orderby )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'term_order' == $orderby ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $orderby = 'tr.term_order';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- else if ( 'none' == $orderby ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'none' == $orderby ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $orderby = '';
</span><span class="cx" style="display: block; padding: 0 10px"> $order = '';
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2654,17 +2654,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $object_ids = implode(', ', $object_ids);
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $select_this = '';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'all' == $fields )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'all' == $fields ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $select_this = 't.*, tt.*';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- else if ( 'ids' == $fields )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'ids' == $fields ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $select_this = 't.term_id';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- else if ( 'names' == $fields )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'names' == $fields ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $select_this = 't.name';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- else if ( 'slugs' == $fields )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'slugs' == $fields ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $select_this = 't.slug';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- else if ( 'all_with_object_id' == $fields )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'all_with_object_id' == $fields ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $select_this = 't.*, tt.*, tr.object_id';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> $query = "SELECT $select_this FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN $wpdb->term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ($taxonomies) AND tr.object_id IN ($object_ids) $orderby $order";
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $objects = false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2676,14 +2676,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = array_merge( $terms, $_terms );
</span><span class="cx" style="display: block; padding: 0 10px"> update_term_cache( $terms );
</span><span class="cx" style="display: block; padding: 0 10px"> $objects = true;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( 'ids' == $fields || 'names' == $fields || 'slugs' == $fields ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'ids' == $fields || 'names' == $fields || 'slugs' == $fields ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $_terms = $wpdb->get_col( $query );
</span><span class="cx" style="display: block; padding: 0 10px"> $_field = ( 'ids' == $fields ) ? 'term_id' : 'name';
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $_terms as $key => $term ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $_terms[$key] = sanitize_term_field( $_field, $term, $term, $taxonomy, 'raw' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = array_merge( $terms, $_terms );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( 'tt_ids' == $fields ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'tt_ids' == $fields ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $terms = $wpdb->get_col("SELECT tr.term_taxonomy_id FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tr.object_id IN ($object_ids) AND tt.taxonomy IN ($taxonomies) $orderby $order");
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $terms as $key => $tt_id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $terms[$key] = sanitize_term_field( 'term_taxonomy_id', $tt_id, 0, $taxonomy, 'raw' ); // 0 should be the term id, however is not needed when using raw context.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2822,7 +2822,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $alias->term_group ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // The alias we want is already in a group, so let's use that one.
</span><span class="cx" style="display: block; padding: 0 10px"> $term_group = $alias->term_group;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( ! empty( $alias->term_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( ! empty( $alias->term_id ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="cx" style="display: block; padding: 0 10px"> * The alias is not in a group, so we create a new one
</span><span class="cx" style="display: block; padding: 0 10px"> * and add the alias to it.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3334,7 +3334,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $alias->term_group ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // The alias we want is already in a group, so let's use that one.
</span><span class="cx" style="display: block; padding: 0 10px"> $term_group = $alias->term_group;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( ! empty( $alias->term_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( ! empty( $alias->term_id ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="cx" style="display: block; padding: 0 10px"> * The alias is not in a group, so we create a new one
</span><span class="cx" style="display: block; padding: 0 10px"> * and add the alias to it.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4329,7 +4329,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $resource_type ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_taxonomy_hierarchical( $object_type ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $resource_type = 'taxonomy';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else if ( post_type_exists( $object_type ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( post_type_exists( $object_type ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $resource_type = 'post_type';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre>
</div>
</div>
</body>
</html>