From 42a2b4a12f62559fdec2a1c4f052bdaea38f1d00 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 14 Sep 2012 20:26:20 +0000 Subject: [PATCH] "[ ] Discourage search engines from indexing this site". fixes #16416. git-svn-id: https://develop.svn.wordpress.org/trunk@21851 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/options-reading.php | 10 +++++----- wp-includes/formatting.php | 8 ++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/wp-admin/options-reading.php b/wp-admin/options-reading.php index b297010865..1c83fbf589 100644 --- a/wp-admin/options-reading.php +++ b/wp-admin/options-reading.php @@ -142,15 +142,15 @@ else :
/> -
+
/> - +

-
diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 43c5ad00af..2f704982f3 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -2797,6 +2797,14 @@ function sanitize_option($option, $value) { $value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value); // strips slashes break; + case 'blog_public': + // This is the value if the settings checkbox is not checked on POST. Don't rely on this. + if ( null === $value ) + $value = 1; + else + $value = intval( $value ); + break; + case 'date_format': case 'time_format': case 'mailserver_url':