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 "acf/validate_save_post_statuses" filter #939

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bamadesigner
Copy link

Hi!

I am using ACF to build an intranet/membership site where we allow people to create "private" content alongside "public" content. Whether the content is only visible to the author or other site members, the content is still displayed on the site and needs to be processed and validated.

I have created code that throws validation errors during the "acf/validate_save_post" hook. The issue is that this hook only runs if the post status is set to "publish" and doesn't run for my "private" content.

This pull request introduces the 'acf/validate_save_post_statuses' filter. The default behavior remains the same (only runs for the "publish" post status) but allows users like myself to hook into this filter to set other post statues for validation.

…ve_post() to run for post statuses other than "publish"
@bamadesigner bamadesigner requested a review from a team as a code owner November 13, 2024 20:03
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.

1 participant