Hide the charset setting for installs that have a charset of UTF-8 already. fixes #21507.
git-svn-id: http://core.svn.wordpress.org/trunk@21467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e27c374cf0
commit
3d479c0b51
|
@ -120,12 +120,17 @@ else :
|
|||
</fieldset></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th scope="row"><label for="blog_charset"><?php _e( 'Encoding for pages and feeds' ); ?></label></th>
|
||||
<td><input name="blog_charset" type="text" id="blog_charset" value="<?php form_option( 'blog_charset' ); ?>" class="regular-text" />
|
||||
<p class="description"><?php _e( 'The <a href="http://codex.wordpress.org/Glossary#Character_set">character encoding</a> of your site (UTF-8 is recommended, if you are adventurous there are some <a href="http://en.wikipedia.org/wiki/Character_set">other encodings</a>)' ); ?></p></td>
|
||||
</tr>
|
||||
<?php do_settings_fields( 'reading', 'default' ); ?>
|
||||
<?php
|
||||
function options_reading_blog_charset() {
|
||||
echo '<input name="blog_charset" type="text" id="blog_charset" value="' . esc_attr( get_option( 'blog_charset' ) ) . '" class="regular-text" />';
|
||||
echo '<p class="description">' . __( 'The <a href="http://codex.wordpress.org/Glossary#Character_set">character encoding</a> of your site (UTF-8 is recommended)' )
|
||||
. '</p>';
|
||||
}
|
||||
|
||||
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' ); ?>
|
||||
</table>
|
||||
|
||||
<?php do_settings_sections( 'reading' ); ?>
|
||||
|
|
Loading…
Reference in New Issue