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
This commit is contained in:
Andrew Nacin 2012-10-08 18:41:19 +00:00
parent 64e8309d8e
commit bbd97dc498
1 changed files with 5 additions and 0 deletions

View File

@ -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;