Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello aronblack,

    If the post is private and then becomes published (i.e. its status is “publish”), then Post Status Notification will run like normal.

    Thread Starter aronblack

    (@aronblack)

    how would i include private posts?do i edit the code here:

    /**
    * Returns all post types that are queryable and public
    *
    * @access public
    * @static
    * @return void
    */
    static function get_post_types() {

    $post_types = get_post_types(array(‘public’ => true));

    unset($post_types[‘attachment’]);
    unset($post_types[‘page’]);

    return $post_types;
    }

    Currently the plugin will run the notification when a post, written by a contributor, is changed from private to publish. You do not need to edit any code to get this result.

    The code you are referencing is for post types not post statii.

    If you have any other questions please let me know ??

    Thread Starter aronblack

    (@aronblack)

    Thanks KJ
    I would like to send notifications even if the post is private, is that possible?
    and how would i do it?

    You would have to edit the code directly in order to make that happen since the plugin does not currently support that.

    The actual email is sent in this function so you have edit the code there to do whatever you want ??

    https://github.com/kjbenk/wpsite-post-status-notifications/blob/master/wpsite-post-status-notification.php#L339-L541

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘private post’ is closed to new replies.