X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/256a3b381f63716209b3527d0a14442ae570c283..c81aba3d563f7459dc79140e4c5be67bcf506b92:/wp-admin/options-discussion.php diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php index 717defa6..3d59195f 100644 --- a/wp-admin/options-discussion.php +++ b/wp-admin/options-discussion.php @@ -14,6 +14,8 @@ if ( ! current_user_can( 'manage_options' ) ) $title = __('Discussion Settings'); $parent_file = 'options-general.php'; +add_action( 'admin_print_footer_scripts', 'options_discussion_add_js' ); + get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __('Overview'), @@ -23,21 +25,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' ); ?>
-

+

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

- +

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

-

+

-

+

@@ -168,23 +169,27 @@ printf( __('Comments should be displayed with the %s comments at the top of each
-

+

- + - + - + - +
@@ -207,15 +212,15 @@ endforeach;
-
+
__('Mystery Man'), + 'mystery' => __('Mystery Person'), 'blank' => __('Blank'), 'gravatar_default' => __('Gravatar Logo'), 'identicon' => __('Identicon (Generated)'), @@ -234,21 +239,28 @@ $avatar_defaults = array( * @param array $avatar_defaults Array of default avatars. */ $avatar_defaults = apply_filters( 'avatar_defaults', $avatar_defaults ); -$default = get_option('avatar_default'); -if ( empty($default) ) - $default = 'mystery'; +$default = get_option( 'avatar_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. *