A WordPress-centric search engine for devs and theme authors



options_discussion_add_js ›

Since4.2.0
Deprecatedn/a
options_discussion_add_js ( No parameters )
Defined at:
Codex:

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



Source

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
}