Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gravatar requests are not blocked in comments list table #13

Open
ocean90 opened this issue May 18, 2018 · 2 comments
Open

Gravatar requests are not blocked in comments list table #13

ocean90 opened this issue May 18, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@ocean90
Copy link
Contributor

ocean90 commented May 18, 2018

When Gravatar requests are blocked the default mystery image in the comments list table is still requested from gravatar.com.

It looks like this is caused by get_avatar( $comment, 32, 'mystery' ); in WP_Comments_List_Table::floated_admin_avatar(). Removing the mystery default loads the local image.

@ocean90
Copy link
Contributor Author

ocean90 commented May 18, 2018

Workaround/Fix:

/**
 * Overrides any custom default value with the one set in the settings.
 *
 * @param array $args Arguments passed to get_avatar_data(), after processing.
 * @return $array Filtered arguments.
 * */
function ds_force_avatar_default( $args ) {
	$args['default'] = get_option( 'avatar_default', 'mystery' );
	return $args;
}
add_filter( 'pre_get_avatar_data', 'ds_force_avatar_default' );

@JJJ JJJ added this to the 2.0.0 milestone Apr 12, 2021
@JJJ JJJ self-assigned this Apr 12, 2021
@JJJ JJJ added the bug label Apr 12, 2021
@JJJ
Copy link
Contributor

JJJ commented Apr 12, 2021

🤦‍♂️ it appears this feature is simply not working as intended anymore.

When selected, even picking the "Blank" still makes requests out to Gravatar.com.

Also, it is possible to have a Gravatar value selected, say... "Retro", then turn it on, and end up with a faulty value:

jjj-on-2021-04-12-at-15-02-35@2x

Moving this to the 2.0.0 milestone to work on it asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants