WordPress.org

Ready to get started?Download WordPress

Forums

Notifly
No mails by private posts (4 posts)

  1. edik
    Member
    Posted 3 months 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)
    Tech Ninja
    Plugin Author

    Posted 3 months 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 3 months 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 1 month ago #

    @edik thanks ;-)

Reply

You must log in to post.

About this Plugin

About this Topic