Skip to content

Commit

Permalink
Merge pull request #4040 from 10up/fix/issue-4034
Browse files Browse the repository at this point in the history
Only display the Exclude From Search checkbox if the post type supports custom fields
  • Loading branch information
felipeelia authored Dec 11, 2024
2 parents 2385b63 + 6b31b70 commit bcb55e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/classes/Feature/Search/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,10 @@ public function enqueue_block_editor_assets() {
return;
}

if ( ! $post->post_type || ! post_type_supports( $post->post_type, 'custom-fields' ) ) {
return;
}

wp_enqueue_script(
'ep-search-editor',
EP_URL . 'dist/js/search-editor-script.js',
Expand Down

0 comments on commit bcb55e3

Please sign in to comment.