options_reading_add_js() – Display JavaScript on the page.
You appear to be a bot. Output may be restricted
Description
Display JavaScript on the page.
Usage
options_reading_add_js();
Parameters
Returns
void
Source
File name: wordpress/wp-admin/includes/options.php
Lines:
1 to 16 of 16
function options_reading_add_js() { ?> <script type="text/javascript"> jQuery( function($) { var section = $('#front-static-pages'), staticPage = section.find('input:radio[value="page"]'), selects = section.find('select'), check_disabled = function(){ selects.prop( 'disabled', ! staticPage.prop('checked') ); }; check_disabled(); section.find( 'input:radio' ).on( 'change', check_disabled ); } ); </script> <?php }