WordPress.org

Make WordPress Core

Ticket #15205: 15205.diff

File 15205.diff, 1.4 KB (added by koopersmith, 3 years ago)
  • wp-admin/options-reading.php

     
    1515$title = __( 'Reading Settings' ); 
    1616$parent_file = 'options-general.php'; 
    1717 
     18/** 
     19 * Display JavaScript on the page. 
     20 * 
     21 * @package WordPress 
     22 * @subpackage Reading_Settings_Screen 
     23 */ 
     24function add_js() { 
     25?> 
     26<script type="text/javascript"> 
     27//<![CDATA[ 
     28        jQuery(document).ready(function($){ 
     29                var section = $('#front-static-pages'), 
     30                        staticPage = section.find('input:radio[value="page"]'), 
     31                        selects = section.find('select'), 
     32                        check_disabled = function(){ 
     33                                selects.attr('disabled', staticPage.is(':checked') ? 'disabled' : ''); 
     34                        }; 
     35                check_disabled(); 
     36                section.find('input:radio').change(check_disabled); 
     37        }); 
     38//]]> 
     39</script> 
     40<?php 
     41} 
     42add_action('admin_head', 'add_js'); 
     43 
    1844add_contextual_help($current_screen, 
    1945        '<p>' . __('This screen contains the settings that affect the display of your content.') . '</p>' . 
    2046        '<p>' . sprintf(__('You can choose what&#8217;s displayed on the front page of your site. It can be posts in reverse chronological order (classic blog), or a fixed/static page. To set a static home page, you first need to create two <a href="%s">Pages</a>. One will become the front page, and the other will be where your posts are displayed.'), 'post-new.php?post_type=page') . '</p>' .