options_reading_add_js

Advertisement

Summery Summery

Display JavaScript on the page.

Syntax Syntax

options_reading_add_js()

Source Source

File: wp-admin/includes/options.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' ).change( check_disabled );
	});
</script>
	<?php
}

Advertisement

Changelog Changelog

Changelog
Version Description
3.5.0 Introduced.

Advertisement

Leave a Reply