-
Notifications
You must be signed in to change notification settings - Fork 133
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
Post Author notifications UI fixes #519
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add inline JS variables `post_author_id` - the ID of the post author `post_author_is_follower` - if the post_author is subscribed to post notifications `post_author_auto_subscribe` - if post authors are set to be automatically subscribed
`maybe_disable_post_author_checkbox` will disable the post_author checkbox from the Notifications Meta Box if: 1. Post authors are automatically subscribed, and 2. If the post author is currently subscribed `display_post_author_warning` will add a visual indicator that this user is the Post Author.
Tested successfully in conjunction with #540. It makes sense to merge these together, as that will allow users to unsubscribe from their own posts which I don't think we want. |
Looking good. Couple thoughts:
|
Closing; continued in #563 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will disable the notifications checkbox for
post_authors
if:ef_notification_auto_subscribe_post_author
filter is true (default behaviour)post_author
is currently subscribed (there is an edge case where they might not be)We also add a visual indication that the user is the Post Author:

Thoughts on implementation:
My first attempt was to change how the user list is populated in
class-module.php
, but I quickly realized that looping through each user to programmatically add details is resource-intensive when you have many users. I opted for JavaScript because this way we don't have to loop through each user, we can just target one specific user and modify the elements that way.Fixes #508