Skip to content

Commit 07ff0e3

Browse files
committed
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
1 parent b45377f commit 07ff0e3

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

wp-admin/options-reading.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
/**
1919
* Display JavaScript on the page.
2020
*
21-
* @package WordPress
22-
* @subpackage Reading_Settings_Screen
21+
* @since 3.5.0
2322
*/
2423
function options_reading_add_js() {
2524
?>
@@ -41,6 +40,16 @@ function options_reading_add_js() {
4140
}
4241
add_action('admin_head', 'options_reading_add_js');
4342

43+
/**
44+
* Render the blog charset setting.
45+
*
46+
* @since 3.5.0
47+
*/
48+
function options_reading_blog_charset() {
49+
echo '<input name="blog_charset" type="text" id="blog_charset" value="' . esc_attr( get_option( 'blog_charset' ) ) . '" class="regular-text" />';
50+
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>';
51+
}
52+
4453
get_current_screen()->add_help_tab( array(
4554
'id' => 'overview',
4655
'title' => __('Overview'),
@@ -74,11 +83,6 @@ function options_reading_add_js() {
7483
<?php
7584
settings_fields( 'reading' );
7685

77-
function options_reading_blog_charset() {
78-
echo '<input name="blog_charset" type="text" id="blog_charset" value="' . esc_attr( get_option( 'blog_charset' ) ) . '" class="regular-text" />';
79-
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>';
80-
}
81-
8286
if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) )
8387
add_settings_field( 'blog_charset', __( 'Encoding for pages and feeds' ), 'options_reading_blog_charset', 'reading', 'default', array( 'label_for' => 'blog_charset' ) );
8488
?>

0 commit comments

Comments
 (0)