Skip to content

Commit

Permalink
Fix for tags not working when breaking into groups
Browse files Browse the repository at this point in the history
  • Loading branch information
szk11001 committed Nov 9, 2015
1 parent 53815f2 commit a33f8a3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions user-people.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ function createTextCell($setting, $field){
if ($specific_groups != false || $specific_tags != false){

$tax_query = array();
$isTagSet = false;

if ($specific_groups != false) {
$group_query = array(
Expand All @@ -85,6 +86,7 @@ function createTextCell($setting, $field){
array_push($tax_query, $group_query);
}
if ($specific_tags != false) {
$isTagSet = true;
$tag_query = array(
'taxonomy' => 'persontag',
'field' => 'term_id',
Expand Down Expand Up @@ -134,6 +136,9 @@ function createTextCell($setting, $field){
'terms' => $value
);
array_push($tax_query, $group_query);
if( $isTagSet != false ){
array_push($tax_query, $tag_query);
}
$args['tax_query'] = $tax_query;

// with $arg updated, let's do a new query.
Expand Down

0 comments on commit a33f8a3

Please sign in to comment.