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

Disable Gravatar when disabling comments #19

Open
elosha opened this issue Dec 15, 2020 · 3 comments
Open

Disable Gravatar when disabling comments #19

elosha opened this issue Dec 15, 2020 · 3 comments
Assignees
Labels

Comments

@elosha
Copy link

elosha commented Dec 15, 2020

If you disable Gravatar by means of WP's own discussion settings, then disable comments using this plugin, suddenly Gravatar appears be enabled again. For example a Gravatar image will be loaded by the admin bar.

If you then re-enable comments and visit WP's discussion settings, Gravatar is also enabled again.

PS: Awesome plugin! <3 Huge thank you from my side.

@ethanraevan ethanraevan self-assigned this Dec 21, 2020
@ethanraevan
Copy link
Member

Hi @elosha, thanks for addressing this. I'll try to replicate this on my end to see if the same happens to me. Do you run any other plugins that change comments or Gravatar? I want to make sure you're not running any plugins that are conflicting with Disable Blogging.

@elosha
Copy link
Author

elosha commented Dec 21, 2020

Thanks! I used WP-Disable before but that has shown the same issues (on multiple installs) and started to get bloated. Therefore I swapped it for your plug-in, which is way cleaner. 💯 I've got no other plug-ins installed that are related to avatars/blogging.

@joshuadavidnelson
Copy link
Collaborator

I tried to replicate this connection to the comment settings and avatar settings without success, but caught this other Disable Blogging option that might be the source.

It appears the logic in the plugin is if the "Avatar Display" option (under the "Profile" tab in Settings > Blogging) is checked, it sets the Discussion settings for "Show avatars" to 0 (unchecked, toggling off Gravatars). However, if you uncheck the Disable Blogging "Avatar Display" settings, it will also set the Discussion setting to 1 (toggling Gravatars back on).

This essentially means that the setting in Discussions cannot be un/set while Disable Blogging is active if there are options selected in the about_yourself section of Blogging settings page (see this code).

I don't think that's a great user experience and since there is already a core option in the Discussion settings, I would propose we either remove the "Avatar Display" option from Disable Blogging entirely - or, perhaps, only showing the option & performing this logic when comments are disabled (and the Discussion settings are unavailable). If my assessment of the issue makes sense, I'd be happy to put a PR together.

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

3 participants