From 3d26146c17a9f70eb58235de413f312e32e9f6f6 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sun, 17 Apr 2016 10:18:39 +0000 Subject: [PATCH] Admin: Fix default avatar handling in Settings -> Discussion. By passing the `force_default` argument to `get_avatar()` instead of using `preg_replace`, we make it easier for developers to override the output. Props henry.wright. Fixes #34744. git-svn-id: https://develop.svn.wordpress.org/trunk@37227 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/options-discussion.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/wp-admin/options-discussion.php b/src/wp-admin/options-discussion.php index 3d59195fd4..27248eaa58 100644 --- a/src/wp-admin/options-discussion.php +++ b/src/wp-admin/options-discussion.php @@ -240,7 +240,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 +248,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'; $avatar_list .= '
'; }