options_discussion_add_js()
Output JavaScript to toggle display of additional settings if avatars are disabled.
No Hooks.
Return
null
. Nothing (null).
Usage
options_discussion_add_js();
Changelog
Since 4.2.0 | Introduced. |
options_discussion_add_js() options discussion add js code WP 6.6.2
<?php function options_discussion_add_js() { ?> <script> (function($){ var parent = $( '#show_avatars' ), children = $( '.avatar-settings' ); parent.on( 'change', function(){ children.toggleClass( 'hide-if-js', ! this.checked ); }); })(jQuery); </script> <?php }