X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/256a3b381f63716209b3527d0a14442ae570c283..38ac4bc40322ecdc4052db4263466573e01fa51f:/wp-admin/options-discussion.php?ds=sidebyside diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php index 717defa6..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,8 +43,8 @@ get_current_screen()->add_help_tab( array( get_current_screen()->set_help_sidebar( '

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

' . - '

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

' . - '

' . __('Support Forums') . '

' + '

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

' . + '

' . __('Support Forums') . '

' ); include( ABSPATH . 'wp-admin/admin-header.php' ); @@ -37,7 +57,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' ); - + - + - + - + - + - +
@@ -80,7 +100,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' ); * * @since 2.7.0. * - * @param int $10 The maximum depth of threaded comments. Default 10. + * @param int $max_depth The maximum depth of threaded comments. Default 10. */ $maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 ); @@ -123,7 +143,7 @@ printf( __('Comments should be displayed with the %s comments at the top of each ?>

@@ -156,7 +176,7 @@ printf( __('Comments should be displayed with the %s comments at the top of each

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

- + - + - + - +
@@ -207,7 +231,7 @@ endforeach;
@@ -215,7 +239,7 @@ endforeach; __('Mystery Man'), + 'mystery' => __('Mystery Person'), 'blank' => __('Blank'), 'gravatar_default' => __('Gravatar Logo'), 'identicon' => __('Identicon (Generated)'), @@ -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. *