Skip to content

Commit

Permalink
Ensure custom results taxonomy is not public.
Browse files Browse the repository at this point in the history
  • Loading branch information
JakePT committed Sep 15, 2023
1 parent 06ed936 commit bf5ea7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion includes/classes/Feature/Search/Weighting.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function get_weightable_fields_for_post_type( $post_type ) {

$taxonomies = array_intersect( $public_taxonomies, $post_type_taxonomies );

if ( $taxonomies ) {
if ( ! empty( $taxonomies ) ) {
$fields['taxonomies'] = [
'label' => __( 'Taxonomies', 'elasticpress' ),
'children' => [],
Expand Down
1 change: 1 addition & 0 deletions includes/classes/Feature/SearchOrdering/SearchOrdering.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ public function register_post_type() {
'show_admin_column' => false,
'query_var' => false,
'rewrite' => false,
'public' => false,
);

/** Features Class @var Features $features */
Expand Down

0 comments on commit bf5ea7f

Please sign in to comment.