Skip to content

Commit

Permalink
Merge pull request #331 from zymeth25/fix-exclude-tags
Browse files Browse the repository at this point in the history
Fix args overwrite bug in exclude_tags
  • Loading branch information
picandocodigo authored Aug 13, 2018
2 parents 6d047b4 + 6278650 commit ad5d1c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/lcp-parameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function get_query_params($params){
}

if ( $this->utils->lcp_not_empty('exclude_tags') ){
$args = $this->lcp_excluded_tags($params);
$args = $this->lcp_excluded_tags($args);
}

// Current tags
Expand Down Expand Up @@ -279,7 +279,7 @@ private function lcp_types_and_statuses($args){
}

private function lcp_excluded_tags($args){
$excluded_tags = explode(",", $args['exclude_tags']);
$excluded_tags = explode(",", $this->params['exclude_tags']);
$tag_ids = array();
foreach ( $excluded_tags as $excluded){
$tag_ids[] = get_term_by('slug', $excluded, 'post_tag')->term_id;
Expand Down

0 comments on commit ad5d1c2

Please sign in to comment.