WordPress.org

Forums

Notifly
No mails by private posts (5 posts)

  1. edik
    Member
    Posted 1 year ago #

    Hi,
    Am I right if I say that the plugin should send mails if a user publishes a post privately? I ask because it doesn't. The following lines in the function post_email stop private publishing notifications:

    if ( 'publish' != $new || 'publish' == $old )
    return;

    https://wordpress.org/plugins/notifly/

  2. Samuel Wood (Otto)
    WordPress.org Tech Dude
    Plugin Author

    Posted 1 year ago #

    It doesn't send emails for private posts because, well, private. Whether it should send them or not is debatable, but yes, this is intentional.

  3. edik
    Member
    Posted 1 year ago #

    Okay, if so, I found a bug. :D
    Notifly send emails for comments on private posts. But they are also private.

    Besides a suggestion: what about a filter to allow notifications for private content? I'm sure that there are more users who need such a feature and it would prevent me from forking your plugin. And forks are evil. :D

    Currently I replaced the code above by:

    $public_statuses = array( 'publish', 'private' );
    $only_updated = in_array( $old, $public_statuses );
    $public = in_array( $new, $public_statuses );
    if ( $only_updated || ! $own_public ) return;
  4. Alberto Hornero
    Member
    Posted 11 months ago #

    @edik thanks ;-)

  5. edik
    Member
    Posted 7 months ago #

    I wrote an alternative version of the plugin with some differences.

    Now there also exists a mini plugin for my alternative which adds notifications for private posts .

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Notifly
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic