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

Allow notifications for private posts and comments on private posts #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

casparhubinger
Copy link

  • Introduces a new filter falcon.connector.wordpress.notify_on_private (default: false).
  • Duplicates notify_on_publish() method as notify_on_private() and its filter falcon.connector.wordpress.should_notify_publish as falcon.connector.wordpress.should_notify_private; does the exact same thing as the original, but for private posts. (I’m not entirely sure if the duplicate is really necessary, or if notify_on_publish() could just be modified, but I didn’t see any straightforward way, so I went with this.)
  • Adds a new check for comments on private posts in notify_on_reply(), based on the new falcon.connector.wordpress.notify_on_privat filter and a post status of private.

Granted this is quite an opionated use case. 🙂 I added it on my blog over the weekend where I’m allowing my registered subscribers to view and comment on private posts, and with these changes, notifications work neatly. Didn’t test it with commenting via email, though, as I’m not using that feature.

- Introduces a new filter `falcon.connector.wordpress.notify_on_private` (default: `false`).
- Duplicates `notify_on_publish()` method as `notify_on_private()` and its filter `falcon.connector.wordpress.should_notify_publish` as `falcon.connector.wordpress.should_notify_private`; does the exact same thing as the original, but for private posts.
- Adds a new check for comments on private posts in `notify_on_reply()`, based on the new `falcon.connector.wordpress.notify_on_privat` filter and a post status of `private`.
@casparhubinger casparhubinger requested a review from rmccue January 19, 2020 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants