modules/related-posts/jetpack-related-posts.php 1 location
|
@@ 679-689 (lines=11) @@
|
| 676 |
|
if ( ! empty( $args['has_terms'] ) ) { |
| 677 |
|
foreach( (array)$args['has_terms'] as $term ) { |
| 678 |
|
if ( mb_strlen( $term->taxonomy ) ) { |
| 679 |
|
switch ( $term->taxonomy ) { |
| 680 |
|
case 'post_tag': |
| 681 |
|
$tax_fld = 'tag.slug'; |
| 682 |
|
break; |
| 683 |
|
case 'category': |
| 684 |
|
$tax_fld = 'category.slug'; |
| 685 |
|
break; |
| 686 |
|
default: |
| 687 |
|
$tax_fld = 'taxonomy.' . $term->taxonomy . '.slug'; |
| 688 |
|
break; |
| 689 |
|
} |
| 690 |
|
$filters[] = array( 'term' => array( $tax_fld => $term->slug ) ); |
| 691 |
|
} |
| 692 |
|
} |
modules/search/class.jetpack-search.php 1 location
|
@@ 1026-1041 (lines=16) @@
|
| 1023 |
|
$terms = (array) $terms; |
| 1024 |
|
|
| 1025 |
|
if ( count( $terms ) && mb_strlen( $tax ) ) { |
| 1026 |
|
switch ( $tax ) { |
| 1027 |
|
case 'post_tag': |
| 1028 |
|
$tax_fld = 'tag.slug'; |
| 1029 |
|
|
| 1030 |
|
break; |
| 1031 |
|
|
| 1032 |
|
case 'category': |
| 1033 |
|
$tax_fld = 'category.slug'; |
| 1034 |
|
|
| 1035 |
|
break; |
| 1036 |
|
|
| 1037 |
|
default: |
| 1038 |
|
$tax_fld = 'taxonomy.' . $tax . '.slug'; |
| 1039 |
|
|
| 1040 |
|
break; |
| 1041 |
|
} |
| 1042 |
|
|
| 1043 |
|
foreach ( $terms as $term ) { |
| 1044 |
|
$parser->add_filter( array( |