X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/af50974463450c98503e763a7836a50e260461a9..38ac4bc40322ecdc4052db4263466573e01fa51f:/wp-admin/options-discussion.php diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php index c9c8627e..41450fc4 100644 --- a/wp-admin/options-discussion.php +++ b/wp-admin/options-discussion.php @@ -14,6 +14,26 @@ 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() { +?> + +add_help_tab( array( 'id' => 'overview', 'title' => __('Overview'), @@ -23,7 +43,7 @@ get_current_screen()->add_help_tab( array( get_current_screen()->set_help_sidebar( '

' . __('For more information:') . '

' . - '

' . __('Documentation on Discussion Settings') . '

' . + '

' . __('Documentation on Discussion Settings') . '

' . '

' . __('Support Forums') . '

' ); @@ -172,19 +192,23 @@ printf( __('Comments should be displayed with the %s comments at the top of each

- + - + - +
@@ -207,7 +231,7 @@ endforeach;
@@ -239,16 +263,25 @@ if ( empty($default) ) $default = 'mystery'; $size = 32; $avatar_list = ''; + +// Force avatars on to display these choices +add_filter( 'pre_option_show_avatars', '__return_true', 100 ); + foreach ( $avatar_defaults as $default_key => $default_name ) { $selected = ($default == $default_key) ? 'checked="checked" ' : ''; $avatar_list .= "\n\t'; $avatar_list .= '
'; } + +remove_filter( 'pre_option_show_avatars', '__return_true', 100 ); + /** * Filter the HTML output of the default avatar list. *