modules/search/class.jetpack-search.php 1 location
|
@@ 1023-1038 (lines=16) @@
|
1020 |
|
$terms = (array) $terms; |
1021 |
|
|
1022 |
|
if ( count( $terms ) && mb_strlen( $tax ) ) { |
1023 |
|
switch ( $tax ) { |
1024 |
|
case 'post_tag': |
1025 |
|
$tax_fld = 'tag.slug'; |
1026 |
|
|
1027 |
|
break; |
1028 |
|
|
1029 |
|
case 'category': |
1030 |
|
$tax_fld = 'category.slug'; |
1031 |
|
|
1032 |
|
break; |
1033 |
|
|
1034 |
|
default: |
1035 |
|
$tax_fld = 'taxonomy.' . $tax . '.slug'; |
1036 |
|
|
1037 |
|
break; |
1038 |
|
} |
1039 |
|
|
1040 |
|
foreach ( $terms as $term ) { |
1041 |
|
$parser->add_filter( array( |
modules/related-posts/jetpack-related-posts.php 1 location
|
@@ 874-884 (lines=11) @@
|
871 |
|
if ( ! empty( $args['has_terms'] ) ) { |
872 |
|
foreach( (array)$args['has_terms'] as $term ) { |
873 |
|
if ( mb_strlen( $term->taxonomy ) ) { |
874 |
|
switch ( $term->taxonomy ) { |
875 |
|
case 'post_tag': |
876 |
|
$tax_fld = 'tag.slug'; |
877 |
|
break; |
878 |
|
case 'category': |
879 |
|
$tax_fld = 'category.slug'; |
880 |
|
break; |
881 |
|
default: |
882 |
|
$tax_fld = 'taxonomy.' . $term->taxonomy . '.slug'; |
883 |
|
break; |
884 |
|
} |
885 |
|
$filters[] = array( 'term' => array( $tax_fld => $term->slug ) ); |
886 |
|
} |
887 |
|
} |