Changeset 15946
- Timestamp:
- 10/24/2010 07:20:52 PM (14 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-general.php
r15889 r15946 22 22 * 23 23 * @package WordPress 24 * @subpackage General_Settings_ Panel24 * @subpackage General_Settings_Screen 25 25 */ 26 26 function add_js() { … … 57 57 <?php 58 58 } 59 add_ filter('admin_head', 'add_js');59 add_action('admin_head', 'add_js'); 60 60 61 61 add_contextual_help($current_screen, -
trunk/wp-admin/options-reading.php
r15810 r15946 15 15 $title = __( 'Reading Settings' ); 16 16 $parent_file = 'options-general.php'; 17 18 /** 19 * Display JavaScript on the page. 20 * 21 * @package WordPress 22 * @subpackage Reading_Settings_Screen 23 */ 24 function 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 } 42 add_action('admin_head', 'add_js'); 17 43 18 44 add_contextual_help($current_screen,
Note: See TracChangeset
for help on using the changeset viewer.