-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fix the Privacy Policy help notice #11999
Conversation
…n hook. The new editor does not support the `edit_form_after_title` action hook. Because WordPress Core uses this hook to output the notice, it is not printed to the screen. After WordPress#11604 is merged, legacy style admin notices (`<div class="notice">...notice content...</div>`) will be consumed by the Notices API and displayed. This change ensures that when WordPress#11604 is merged the privacy policy notice will appear again when editing the privacy policy page.
Is there an associated Trac ticket for which this can be considered to be handled more gracefully internal to core itself, as part of the Gutenberg merge? |
@aduth I should have mentioned that. https://core.trac.wordpress.org/ticket/45057 is the associated Trac ticket. Ideally, this would get fixed in Gutenberg 4.5 as well as being merged into core. I think I am envisioning the core action hook being changed to |
…orm_after_title`. This prevents the notice from displaying twice if the notice has already been moved to the `admin_notices` hook (as would happen in https://core.trac.wordpress.org/attachment/ticket/45057/45057.diff).
I updated the conditional to make sure the notice is hooked to |
So this PR depends on #11604. On its own, it doesn't display the notice when I edit Privacy Policy page. |
Related issue: #10448.
Depends on #11604.
The new editor does not support the
edit_form_after_title
action hook. Because WordPress Core uses this hook to output the notice, it is not printed to the screen.After #11604 is merged, legacy style admin notices (
<div class="notice">...notice content...</div>
) will be consumed by the Notices API and displayed. This change ensures that when #11604 is merged the privacy policy notice will appear again when editing the privacy policy page.This PR moves the notice to the
admin_notices
action hook to ensure it is printed to the page and is consumable.To test, ensure the
Need help putting together your new Privacy Policy page?
notice is output in the page source only when editing the privacy policy page. To further test, pull this change into theupdate/legacy-notices
branch locally, and verify the notice correctly appears when editing the privacy policy page.Checklist:
My code follows the accessibility standards.(NA)