mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Block Editor: Show privacy help notice on Privacy Policy page.
When editing a page set to be the Privacy Policy page, display a help notice containing a link to the Privacy Policy guide. Merges [43920] to trunk. Fixes #45057. git-svn-id: https://develop.svn.wordpress.org/trunk@44291 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1612,10 +1612,13 @@ final class WP_Privacy_Policy_Content {
|
||||
* Add a notice with a link to the guide when editing the privacy policy page.
|
||||
*
|
||||
* @since 4.9.6
|
||||
* @since 5.0.0 The $post parameter is now optional.
|
||||
*
|
||||
* @param WP_Post $post The currently edited post.
|
||||
* @param WP_Post|null $post The currently edited post. Default null.
|
||||
*/
|
||||
public static function notice( $post ) {
|
||||
public static function notice( $post = null ) {
|
||||
$post = get_post( $post );
|
||||
|
||||
if ( ! ( $post instanceof WP_Post ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user