Docs for options_reading_blog_charset(). props SergeyBiryukov, fixes #21886.
git-svn-id: https://develop.svn.wordpress.org/trunk@21872 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b45377f3e9
commit
07ff0e30ed
@ -18,8 +18,7 @@ $parent_file = 'options-general.php';
|
||||
/**
|
||||
* Display JavaScript on the page.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Reading_Settings_Screen
|
||||
* @since 3.5.0
|
||||
*/
|
||||
function options_reading_add_js() {
|
||||
?>
|
||||
@ -41,6 +40,16 @@ function options_reading_add_js() {
|
||||
}
|
||||
add_action('admin_head', 'options_reading_add_js');
|
||||
|
||||
/**
|
||||
* Render the blog charset setting.
|
||||
*
|
||||
* @since 3.5.0
|
||||
*/
|
||||
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>';
|
||||
}
|
||||
|
||||
get_current_screen()->add_help_tab( array(
|
||||
'id' => 'overview',
|
||||
'title' => __('Overview'),
|
||||
@ -74,11 +83,6 @@ include( './admin-header.php' );
|
||||
<?php
|
||||
settings_fields( 'reading' );
|
||||
|
||||
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', 'default', array( 'label_for' => 'blog_charset' ) );
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user