WordPress at Your Fingertips
function is not described

options_reading_add_js() WP 3.5.0

Display JavaScript on the page.

No Hooks.

Return

null. Nothing.

Usage

options_reading_add_js();

Changelog

Since 3.5.0 Introduced.

Code of options_reading_add_js() WP 5.8.2

<?php
function options_reading_add_js() {
	?>
<script type="text/javascript">
	jQuery(document).ready(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
}