wp-includes/post.php:4035Resets the page_on_front, show_on_front, and page_for_post settings when a linked page is deleted or trashed.
$post_idintfunction _reset_front_page_settings_for_post( $post_id ) { $post = get_post( $post_id ); if ( 'page' === $post->post_type ) { /* * If the page is defined in option page_on_front or post_for_posts, * adjust the corresponding options. */ if ( (int) get_option( 'page_on_front' ) === $post->ID ) { update_option( 'show_on_front', 'posts' ); update_option( 'page_on_front', 0 ); } if ( (int) get_option( 'page_for_posts' ) === $post->ID ) { update_option( 'page_for_posts', 0 ); } } unstick_post( $post->ID );}Introduced in 3.7.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/post.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.