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';
<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.
*
<?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 — 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) :
'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.
*/
$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
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&forcedefault=1'", $avatar );
- $avatar = preg_replace( "/srcset='(.+?) 2x'/", "srcset='\$1&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 />';
}
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
*