modules/related-posts/jetpack-related-posts.php 1 location
|
@@ 881-891 (lines=11) @@
|
| 878 |
|
if ( ! empty( $args['has_terms'] ) ) { |
| 879 |
|
foreach( (array)$args['has_terms'] as $term ) { |
| 880 |
|
if ( mb_strlen( $term->taxonomy ) ) { |
| 881 |
|
switch ( $term->taxonomy ) { |
| 882 |
|
case 'post_tag': |
| 883 |
|
$tax_fld = 'tag.slug'; |
| 884 |
|
break; |
| 885 |
|
case 'category': |
| 886 |
|
$tax_fld = 'category.slug'; |
| 887 |
|
break; |
| 888 |
|
default: |
| 889 |
|
$tax_fld = 'taxonomy.' . $term->taxonomy . '.slug'; |
| 890 |
|
break; |
| 891 |
|
} |
| 892 |
|
$filters[] = array( 'term' => array( $tax_fld => $term->slug ) ); |
| 893 |
|
} |
| 894 |
|
} |
modules/search/class.jetpack-search.php 1 location
|
@@ 1157-1172 (lines=16) @@
|
| 1154 |
|
$terms = (array) $terms; |
| 1155 |
|
|
| 1156 |
|
if ( count( $terms ) && mb_strlen( $tax ) ) { |
| 1157 |
|
switch ( $tax ) { |
| 1158 |
|
case 'post_tag': |
| 1159 |
|
$tax_fld = 'tag.slug'; |
| 1160 |
|
|
| 1161 |
|
break; |
| 1162 |
|
|
| 1163 |
|
case 'category': |
| 1164 |
|
$tax_fld = 'category.slug'; |
| 1165 |
|
|
| 1166 |
|
break; |
| 1167 |
|
|
| 1168 |
|
default: |
| 1169 |
|
$tax_fld = 'taxonomy.' . $tax . '.slug'; |
| 1170 |
|
|
| 1171 |
|
break; |
| 1172 |
|
} |
| 1173 |
|
|
| 1174 |
|
foreach ( $terms as $term ) { |
| 1175 |
|
$parser->add_filter( |