Make WordPress Core

Changeset 45746


Ignore:
Timestamp:
08/05/2019 07:43:52 AM (5 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r45744 r45746  
    30013001        }
    30023002        if ( get_option( 'page_for_posts' ) == $post->ID ) {
    3003             delete_option( 'page_for_posts', 0 );
     3003            update_option( 'page_for_posts', 0 );
    30043004        }
    30053005    }
Note: See TracChangeset for help on using the changeset viewer.