X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/5aa86a9053fb0fa15846bb60aac2fb8fdfff524a..607b7e02d77e7326161e8ec15639052d2040f745:/wp-admin/options-discussion.php diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php index 6270f99f..5b27e14a 100644 --- a/wp-admin/options-discussion.php +++ b/wp-admin/options-discussion.php @@ -5,16 +5,17 @@ * @package WordPress * @subpackage Administration */ - /** WordPress Administration Bootstrap */ -require_once('./admin.php'); +require_once( dirname( __FILE__ ) . '/admin.php' ); if ( ! current_user_can( 'manage_options' ) ) - wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) ); + wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); $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'), @@ -24,22 +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('./admin-header.php'); +include( ABSPATH . 'wp-admin/admin-header.php' ); ?>
- -

+

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


- +

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

+

-

+

-

+

@@ -162,38 +169,39 @@ printf( __('Comments should be displayed with the %s comments at the top of each
-

+

+ +

-

+ +$show_avatars = get_option( 'show_avatars' ); +?> - + - + - + @@ -250,4 +276,4 @@ echo apply_filters('default_avatar_select', $avatar_list); - +
- __( 'Don’t show Avatars' ), 1 => __( 'Show Avatars' ) ); - foreach ( $yesorno as $key => $value) { - $selected = (get_option('show_avatars') == $key) ? 'checked="checked"' : ''; - echo "\n\t
"; - } -?> +
__('G — Suitable for all audiences'), - /* translators: Content suitability rating: http://bit.ly/89QxZA */ + /* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */ 'PG' => __('PG — Possibly offensive, usually for audiences 13 and above'), - /* translators: Content suitability rating: http://bit.ly/89QxZA */ + /* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */ 'R' => __('R — Intended for adult audiences above 17'), - /* translators: Content suitability rating: http://bit.ly/89QxZA */ + /* translators: Content suitability rating: https://en.wikipedia.org/wiki/Motion_Picture_Association_of_America_film_rating_system */ 'X' => __('X — Even more mature than above') ); foreach ($ratings as $key => $rating) : @@ -204,15 +212,15 @@ endforeach;
-
+
__('Mystery Man'), + 'mystery' => __('Mystery Person'), 'blank' => __('Blank'), 'gravatar_default' => __('Gravatar Logo'), 'identicon' => __('Identicon (Generated)'), @@ -220,23 +228,41 @@ $avatar_defaults = array( 'monsterid' => __('MonsterID (Generated)'), 'retro' => __('Retro (Generated)') ); -$avatar_defaults = apply_filters('avatar_defaults', $avatar_defaults); -$default = get_option('avatar_default'); -if ( empty($default) ) - $default = 'mystery'; -$size = 32; +/** + * Filters the default avatars. + * + * Avatars are stored in key/value pairs, where the key is option value, + * and the name is the displayed avatar name. + * + * @since 2.6.0 + * + * @param array $avatar_defaults Array of default avatars. + */ +$avatar_defaults = apply_filters( 'avatar_defaults', $avatar_defaults ); +$default = get_option( 'avatar_default', 'mystery' ); $avatar_list = ''; -foreach ( $avatar_defaults as $default_key => $default_name ) { - $selected = ($default == $default_key) ? 'checked="checked" ' : ''; - $avatar_list .= "\n\t