mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-15 18:14:26 +00:00
Move ad hoc Options functions to wp-admin/includes/options.php:
* Move `options_discussion_add_js()` from `wp-admin/options-discussion.php` * Move `options_general_add_js()` from `wp-admin/options-general.php` * Move `options_permalink_add_js()` from `wp-admin/options-permalink.php` * Move `options_reading_add_js()` from `wp-admin/options-reading.php` * Move `options_reading_blog_charset()` from `wp-admin/options-reading.php` See #33813. git-svn-id: https://develop.svn.wordpress.org/trunk@34022 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -14,24 +14,6 @@ if ( ! current_user_can( 'manage_options' ) )
|
||||
$title = __('Discussion Settings');
|
||||
$parent_file = 'options-general.php';
|
||||
|
||||
/**
|
||||
* Output JavaScript to toggle display of additional settings if avatars are disabled.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
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
|
||||
}
|
||||
add_action( 'admin_print_footer_scripts', 'options_discussion_add_js' );
|
||||
|
||||
get_current_screen()->add_help_tab( array(
|
||||
|
||||
Reference in New Issue
Block a user