diff -r 346c88efed21 -r 5e2f62d02dcd wp/wp-admin/options-discussion.php --- a/wp/wp-admin/options-discussion.php Mon Jun 08 16:11:51 2015 +0000 +++ b/wp/wp-admin/options-discussion.php Tue Jun 09 03:35:32 2015 +0200 @@ -14,6 +14,26 @@ $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()->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 @@ * * @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 @@ ?>

@@ -157,7 +176,7 @@

@@ -173,19 +192,23 @@

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