]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/options-discussion.php
WordPress 4.7
[autoinstalls/wordpress.git] / wp-admin / options-discussion.php
index 3d59195fd42a05c27bc8669fb1058ae688b27099..fefc0d82df1287ab19a302739f69be05100b1642 100644 (file)
@@ -9,7 +9,7 @@
 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';
@@ -25,8 +25,8 @@ get_current_screen()->add_help_tab( array(
 
 get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="https://codex.wordpress.org/Settings_Discussion_Screen" target="_blank">Documentation on Discussion Settings</a>') . '</p>' .
-       '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+       '<p>' . __('<a href="https://codex.wordpress.org/Settings_Discussion_Screen">Documentation on Discussion Settings</a>') . '</p>' .
+       '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>'
 );
 
 include( ABSPATH . 'wp-admin/admin-header.php' );
@@ -78,7 +78,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
 <input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked('1', get_option('thread_comments')); ?> />
 <?php
 /**
- * Filter the maximum depth of threaded/nested comments.
+ * Filters the maximum depth of threaded/nested comments.
  *
  * @since 2.7.0.
  *
@@ -107,6 +107,7 @@ $default_comments_page .= '>' . __('last') . '</option><option value="oldest"';
 if ( 'oldest' == get_option('default_comments_page') ) $default_comments_page .= ' selected="selected"';
 $default_comments_page .= '>' . __('first') . '</option></select>';
 
+/* translators: 1: Form field control for number of top level comments per page, 2: Form field control for the 'first' or 'last' page */
 printf( __('Break comments into pages with %1$s top level comments per page and the %2$s page displayed by default'), '</label><label for="comments_per_page"><input name="comments_per_page" type="number" step="1" min="0" id="comments_per_page" value="' . esc_attr(get_option('comments_per_page')) . '" class="small-text" />', $default_comments_page );
 
 ?></label>
@@ -195,13 +196,13 @@ $show_avatars = get_option( 'show_avatars' );
 
 <?php
 $ratings = array(
-       /* 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 */
        'G' => __('G &#8212; 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 &#8212; 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 &#8212; 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 &#8212; Even more mature than above')
 );
 foreach ($ratings as $key => $rating) :
@@ -229,7 +230,7 @@ $avatar_defaults = array(
        'retro' => __('Retro (Generated)')
 );
 /**
- * Filter the default avatars.
+ * 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.
@@ -240,7 +241,6 @@ $avatar_defaults = array(
  */
 $avatar_defaults = apply_filters( 'avatar_defaults', $avatar_defaults );
 $default = get_option( 'avatar_default', 'mystery' );
-$size = 32;
 $avatar_list = '';
 
 // Force avatars on to display these choices
@@ -249,12 +249,7 @@ 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<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='" . esc_attr($default_key) . "' {$selected}/> ";
-
-       $avatar = get_avatar( $user_email, $size, $default_key );
-       $avatar = preg_replace( "/src='(.+?)'/", "src='\$1&amp;forcedefault=1'", $avatar );
-       $avatar = preg_replace( "/srcset='(.+?) 2x'/", "srcset='\$1&amp;forcedefault=1 2x'", $avatar );
-       $avatar_list .= $avatar;
-
+       $avatar_list .= get_avatar( $user_email, 32, $default_key, '', array( 'force_default' => true ) );
        $avatar_list .= ' ' . $default_name . '</label>';
        $avatar_list .= '<br />';
 }
@@ -262,7 +257,7 @@ foreach ( $avatar_defaults as $default_key => $default_name ) {
 remove_filter( 'pre_option_show_avatars', '__return_true', 100 );
 
 /**
- * Filter the HTML output of the default avatar list.
+ * Filters the HTML output of the default avatar list.
  *
  * @since 2.6.0
  *