WordPress.org

Make WordPress Core

Ticket #21507: 21507.2.patch

File 21507.2.patch, 1.6 KB (added by SergeyBiryukov, 3 years ago)

With PHPDocs

  • 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'), 
     
    6780<?php 
    6881settings_fields( 'reading' ); 
    6982 
    70 function options_reading_blog_charset() { 
    71         echo '<input name="blog_charset" type="text" id="blog_charset" value="' . esc_attr( get_option( 'blog_charset' ) ) . '" class="regular-text" />'; 
    72         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>'; 
    73 } 
    74  
    7583if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) ) 
    7684        add_settings_field( 'blog_charset', __( 'Encoding for pages and feeds' ), 'options_reading_blog_charset', 'reading' ); 
    7785else