We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like a convenience filter to set the number of fragments for all or any fields.
Change includes/classes/Feature/Search/Search.php from:
$formatted_args['highlight']['fields'][ $field ] = [ 'pre_tags' => [ $opening_tag ], 'post_tags' => [ $closing_tag ], 'type' => 'plain', 'number_of_fragments' => 0, ];
To:
$formatted_args['highlight']['fields'][ $field ] = [ 'pre_tags' => [ $opening_tag ], 'post_tags' => [ $closing_tag ], 'type' => 'plain', 'number_of_fragments' => apply_filters( 'ep_highlight_number_of_fragments', 0, $field ), ];
I have also considered modifying the formatted args, but this seems easier.
The content you are editing has changed. Please copy your edits and refresh the page.
The text was updated successfully, but these errors were encountered:
Hi @dgnorrod, thanks for the suggestion! Do you want to open a PR with that change? If so, don't forget to add the docblock there too, okay? Thanks!
Sorry, something went wrong.
I will.
Closed by #3681
Successfully merging a pull request may close this issue.
Is your enhancement related to a problem? Please describe.
I would like a convenience filter to set the number of fragments for all or any fields.
Designs
Change includes/classes/Feature/Search/Search.php from:
To:
Describe alternatives you've considered
I have also considered modifying the formatted args, but this seems easier.
Code of Conduct
Tasks
The text was updated successfully, but these errors were encountered: