core/Container/Condition/Term_Ancestor_Condition.php 1 location
|
@@ 40-50 (lines=11) @@
|
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
$value = $this->get_value(); |
| 40 |
|
switch ( $this->get_comparison_operator() ) { |
| 41 |
|
case '=': // fallthrough intended |
| 42 |
|
case '!=': |
| 43 |
|
$value = $this->get_term_id_from_full_term_descriptor( $value ); |
| 44 |
|
break; |
| 45 |
|
|
| 46 |
|
case 'IN': // fallthrough intended |
| 47 |
|
case 'NOT IN': |
| 48 |
|
$value = $this->get_term_ids_from_full_term_descriptors( $value ); |
| 49 |
|
break; |
| 50 |
|
} |
| 51 |
|
|
| 52 |
|
return $this->compare( |
| 53 |
|
$ancestors, |
core/Container/Condition/Term_Parent_Condition.php 1 location
|
@@ 35-45 (lines=11) @@
|
| 32 |
|
$parent_term_id = $term ? intval( $term->parent ) : 0; |
| 33 |
|
|
| 34 |
|
$value = $this->get_value(); |
| 35 |
|
switch ( $this->get_comparison_operator() ) { |
| 36 |
|
case '=': // fallthrough intended |
| 37 |
|
case '!=': |
| 38 |
|
$value = $this->get_term_id_from_full_term_descriptor( $value ); |
| 39 |
|
break; |
| 40 |
|
|
| 41 |
|
case 'IN': // fallthrough intended |
| 42 |
|
case 'NOT IN': |
| 43 |
|
$value = $this->get_term_ids_from_full_term_descriptors( $value ); |
| 44 |
|
break; |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
return $this->compare( |
| 48 |
|
$parent_term_id, |