Skip to content
New issue

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

Add Option to exclude post from Search #3100

Merged
merged 21 commits into from
Nov 9, 2022

Conversation

burhandodhy
Copy link
Contributor

@burhandodhy burhandodhy commented Nov 1, 2022

Description of the Change

This PR adds the new option to exclude the certain post from Search.

Closes #253

Changelog Entry

Added - Option to exclude certain posts from Search

Credits

Props @burhandodhy @felipeelia @JakePT

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@felipeelia felipeelia added this to the 4.4.0 milestone Nov 1, 2022
@JakePT
Copy link
Contributor

JakePT commented Nov 7, 2022

@felipeelia @burhandodhy I've done a review of the front end in progress and pushed some tweaks:

  1. I updated the auth_callback for the meta field to explicitly check permissions for the specific field and the specific post being edited.
  2. I organised the JS into a file/folder for the feature, for consistency with most of the other scripts, and I updated the hook that it's enqueued with so that checking the current page isn't necessary.
  3. I simplified the code for the checkbox plugin. The useState and useEffect calls weren't really necessary, and I adopted useSelect and useDispatch for handling the data. With previous implementation the "Update" button wasn't becoming enabled when the checkbox was changed for some reason, but this seems to have fixed that issue.
  4. I updated the "Exclude from search" label to be sentence case, for consistency with the other checkboxes, such as "Stick to the top of the blog".

Let me known if you have any questions about the changes.

@JakePT JakePT removed their request for review November 7, 2022 04:47
@felipeelia
Copy link
Member

Before the release: let's create an article in the Help Center explaining how this works.

@felipeelia felipeelia marked this pull request as ready for review November 7, 2022 19:41
@felipeelia felipeelia assigned burhandodhy and unassigned felipeelia Nov 7, 2022
Co-authored-by: Burhan Nasir <burhandodhy@users.noreply.github.com>
Copy link
Contributor Author

@burhandodhy burhandodhy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@burhandodhy burhandodhy assigned felipeelia and unassigned burhandodhy Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ignore certain posts when indexing
3 participants