WordPress.org

Make WordPress Core

Ticket #21886: 21886.patch

File 21886.patch, 1.7 KB (added by SergeyBiryukov, 6 years ago)
  • wp-admin/options-reading.php

     
    2020 *
    2121 * @package WordPress
    2222 * @subpackage Reading_Settings_Screen
     23 * @since 3.1.0
    2324 */
    2425function add_js() {
    2526?>
     
    4142}
    4243add_action('admin_head', 'add_js');
    4344
     45/**
     46 * Display blog charset option.
     47 *
     48 * @package WordPress
     49 * @subpackage Reading_Settings_Screen
     50 * @since 3.5.0
     51 */
     52function options_reading_blog_charset() {
     53        echo '<input name="blog_charset" type="text" id="blog_charset" value="' . esc_attr( get_option( 'blog_charset' ) ) . '" class="regular-text" />';
     54        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>';
     55}
     56
    4457get_current_screen()->add_help_tab( array(
    4558        'id'      => 'overview',
    4659        'title'   => __('Overview'),
     
    7487<?php
    7588settings_fields( 'reading' );
    7689
    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 
    8290if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) )
    8391        add_settings_field( 'blog_charset', __( 'Encoding for pages and feeds' ), 'options_reading_blog_charset', 'reading', 'default', array( 'label_for' => 'blog_charset' ) );
    8492?>