Support » Plugin: Notifly » No mails by private posts

  • 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 )

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Samuel Wood (Otto)

    (@otto42) Admin

    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.

    Okay, if so, I found a bug. 😀
    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. 😀

    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;

    @edik thanks 😉

    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 .

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘No mails by private posts’ is closed to new replies.