From 853184672d2d236f4246c92fd8cdb2694659082a 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: http://core.svn.wordpress.org/trunk@22135 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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;