Skip to content

Commit 6b3e05b

Browse files
authored
add reset option
1 parent e5745b5 commit 6b3e05b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/wp-admin/includes/class-wp-privacy-policy-content.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,12 @@ public static function notice( $post = null ) {
329329
$current_screen = get_current_screen();
330330
$policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' );
331331

332+
// If the privacy policy page has been deleted, reset the option and bail.
333+
if ( $policy_page_id && ! get_post( $policy_page_id ) ) {
334+
update_option( 'wp_page_for_privacy_policy', 0 );
335+
return;
336+
}
337+
332338
if ( 'post' !== $current_screen->base || $policy_page_id !== $post->ID ) {
333339
return;
334340
}

0 commit comments

Comments
 (0)