From 3bd03e08269755f0dd88ee42bc3b76c539cbba86 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 17 Aug 2012 16:46:47 +0000 Subject: [PATCH] Output a hidden input of blog_charset when we are hiding the option. props SergeyBiryukov. see #21507. git-svn-id: https://develop.svn.wordpress.org/trunk@21539 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/options-reading.php | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/wp-admin/options-reading.php b/wp-admin/options-reading.php index d1ff70f9f9..9ced787640 100644 --- a/wp-admin/options-reading.php +++ b/wp-admin/options-reading.php @@ -64,7 +64,19 @@ include( './admin-header.php' );

- +'; + echo '

' . __( 'The character encoding of your site (UTF-8 is recommended)' ) . '

'; +} + +if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) ) + add_settings_field( 'blog_charset', __( 'Encoding for pages and feeds' ), 'options_reading_blog_charset', 'reading' ); +else + echo ''; +?> @@ -120,17 +132,7 @@ else : -'; - echo '

' . __( 'The character encoding of your site (UTF-8 is recommended)' ) - . '

'; -} - -if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) ) - add_settings_field( 'blog_charset', __( 'Encoding for pages and feeds' ), 'options_reading_blog_charset', 'reading' ); - -do_settings_fields( 'reading', 'default' ); ?> +