diff --git a/wp-admin/includes/admin-filters.php b/wp-admin/includes/admin-filters.php index 16a51b2c53..a1efcc62f4 100644 --- a/wp-admin/includes/admin-filters.php +++ b/wp-admin/includes/admin-filters.php @@ -146,7 +146,7 @@ add_action( 'wp_privacy_personal_data_erased', '_wp_privacy_send_erasure_fulfill add_action( 'admin_init', array( 'WP_Privacy_Policy_Content', 'text_change_check' ), 100 ); // Show a "postbox" with the text suggestions for a privacy policy. -add_action( 'edit_form_after_title', array( 'WP_Privacy_Policy_Content', 'notice' ) ); +add_action( 'admin_notices', array( 'WP_Privacy_Policy_Content', 'notice' ) ); // Add the suggested policy text from WordPress. add_action( 'admin_init', array( 'WP_Privacy_Policy_Content', 'add_suggested_content' ), 1 ); diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index 22434e4816..fc57d206bd 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -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; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 273db30abf..a93b77cb63 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-alpha-44286'; +$wp_version = '5.1-alpha-44291'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.