We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e391d36 commit f4dfb44Copy full SHA for f4dfb44
1 file changed
src/wp-includes/post.php
@@ -4039,11 +4039,13 @@ function _reset_front_page_settings_for_post( $post_id ) {
4039
*/
4040
function _reset_privacy_policy_page_for_post( int $post_id ): void {
4041
$post = get_post( $post_id );
4042
+
4043
+ if ( ! $post ) {
4044
+ return;
4045
+ }
4046
- if ( $post && 'page' === $post->post_type ) {
- if ( (int) get_option( 'wp_page_for_privacy_policy' ) === (int) $post_id ) {
- update_option( 'wp_page_for_privacy_policy', 0 );
- }
4047
+ if ( 'page' === $post->post_type && ( (int) get_option( 'wp_page_for_privacy_policy' ) === (int) $post_id ) {
4048
+ update_option( 'wp_page_for_privacy_policy', 0 );
4049
}
4050
4051
0 commit comments