WordPress开发者和主题制作者的搜索引擎



options_discussion_add_js ›

Since4.2.0
已弃用n/a
options_discussion_add_js ( 没有参数 )
定义在:
文档:

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



源码

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
}