Plugin Directory

Changeset 1787671


Ignore:
Timestamp:
12/15/2017 03:29:03 PM (8 years ago)
Author:
osdwebdev
Message:

Version 1.2.3

Location:
osd-subscribe
Files:
15 added
3 edited

Legend:

Unmodified
Added
Removed
  • osd-subscribe/trunk/includes/osd_subscribe_core.php

    r1012824 r1787671  
    5959
    6060        // Add hooks for publishing
    61         if (is_admin() && !defined('DOING_AJAX')) {
    62             $statuses = apply_filters('osd_subscribe_email_statuses', array('new', 'draft', 'auto-draft', 'pending', 'private', 'future'));
    63             foreach ($statuses as $status) {
    64                 add_action("{$status}_to_publish", array(&$this, "publish"));
    65             }
    66         }
     61        add_action("transition_post_status", array(&$this, "handle_post_status_transition"), 10, 3);
     62
    6763
    6864        // Add hooks for frontend users
     
    8177            add_action('init', array($this, 'categories_for_pages'));
    8278        }
     79    }
     80
     81
     82    function handle_post_status_transition($new_status, $old_status, $post) {
     83        $statuses = apply_filters("osd_subscribe_email_statuses", array('new', 'draft', 'auto-draft', 'pending', 'private', 'future'));
     84
     85        if (!in_array($old_status, $statuses) || $post->post_type !== "post" || $new_status === $old_status || $new_status !== "publish") {
     86            return;
     87        }
     88
     89        $this->publish($post);
    8390    }
    8491
  • osd-subscribe/trunk/osd-subscribe.php

    r1029400 r1787671  
    44Plugin URI: http://outsidesource.com
    55Description: A plugin that adds a customizable and filterable email subscription widget and shortcode for posts.
    6 Version: 1.2.2
     6Version: 1.2.3
    77Author: OSD Web Development Team
    88Author URI: http://outsidesource.com
  • osd-subscribe/trunk/readme.txt

    r1076235 r1787671  
    44Requires at least: 3.4
    55Tested up to: 4.1
    6 Stable tag: 1.2.2
     6Stable tag: 1.2.3
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4040
    4141== Changelog ==
     42
     43= 1.2.3 =
     44* Fixed issue where scheduled posts wouldn't send emails correctly
    4245
    4346= 1.2.2 =
Note: See TracChangeset for help on using the changeset viewer.