Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the Privacy Policy help notice (#11999)
* Display the privacy policy help notice with the `admin_notices` action 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 #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. * Use `get_post()` instead of `global $post`. * Add missing `@since` documentation tag. * Only display the notice if the function is actually hooked to `edit_form_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).
- Loading branch information