From bbd97dc49802abd0c89301e201e38606c6a093e1 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 8 Oct 2012 18:41:19 +0000 Subject: [PATCH] Set show_on_front to 'posts' when no value is set. This occurs when the show_on_front checkbox is left unchecked and then sent through options.php. fixes #22131. git-svn-id: https://develop.svn.wordpress.org/trunk@22135 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/formatting.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index b1cb53480b..e348250abd 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -2780,6 +2780,11 @@ function sanitize_option($option, $value) { $value = absint( $value ); break; + case 'show_on_front' : + if ( ! $value ) + $value = 'posts'; + break; + case 'posts_per_page': case 'posts_per_rss': $value = (int) $value;