X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/fa11948979fd6a4ea5705dc613b239699a459db3..5e031ad59895b5682d1509675cafe9f2c5081c12:/wp-admin/options-discussion.php diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php index 76f6b322..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,22 +43,21 @@ 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' ); ?>
-

- + - + - + - + - + - +

- +

@@ -81,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 ); @@ -124,7 +143,7 @@ printf( __('Comments should be displayed with the %s comments at the top of each ?>

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

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

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