options_discussion_add_js

Advertisement

Summery Summery

Output JavaScript to toggle display of additional settings if avatars are disabled.

Syntax Syntax

options_discussion_add_js()

Source Source

File: wp-admin/includes/options.php

function options_discussion_add_js() {
	?>
	<script>
	(function($){
		var parent = $( '#show_avatars' ),
			children = $( '.avatar-settings' );
		parent.change(function(){
			children.toggleClass( 'hide-if-js', ! this.checked );
		});
	})(jQuery);
	</script>
	<?php
}

Advertisement

Changelog Changelog

Changelog
Version Description
4.2.0 Introduced.

Advertisement

Leave a Reply