Posts, Post Types: Update, not delete the `page_for_posts` option in `_reset_front_page_settings_for_post()` when a linked page is deleted or trashed.

Props diddledan.
Fixes #46850.
Built from https://develop.svn.wordpress.org/trunk@45746


git-svn-id: http://core.svn.wordpress.org/trunk@45557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-08-05 07:44:55 +00:00
parent 41dc3e8d39
commit 69bbdc4022
2 changed files with 2 additions and 2 deletions

View File

@ -3000,7 +3000,7 @@ function _reset_front_page_settings_for_post( $post_id ) {
update_option( 'page_on_front', 0 ); update_option( 'page_on_front', 0 );
} }
if ( get_option( 'page_for_posts' ) == $post->ID ) { if ( get_option( 'page_for_posts' ) == $post->ID ) {
delete_option( 'page_for_posts', 0 ); update_option( 'page_for_posts', 0 );
} }
} }
unstick_post( $post->ID ); unstick_post( $post->ID );

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.3-alpha-45745'; $wp_version = '5.3-alpha-45746';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.