rtCamp\WP\Nginx\Helper::unset_future_post_option_on_delete PHP Method

unset_future_post_option_on_delete() public method

        function unset_future_post_option_on_delete($post_id)
        {
            global $blog_id, $rt_wp_nginx_purger;
            if (!$this->options['enable_purge']) {
                return;
            }
            if ($post_id && !wp_is_post_revision($post_id)) {
                if (isset($this->options['future_posts'][$blog_id][$post_id]) && count($this->options['future_posts'][$blog_id][$post_id])) {
                    $rt_wp_nginx_purger->log("Unset future_posts option (post id = " . $post_id . " and blog id = " . $blog_id . ")");
                    unset($this->options['future_posts'][$blog_id][$post_id]);
                    update_site_option("rt_wp_nginx_helper_global_options", $this->options);
                    if (!count($this->options['future_posts'][$blog_id])) {
                        unset($this->options['future_posts'][$blog_id]);
                        update_site_option("rt_wp_nginx_helper_global_options", $this->options);
                    }
                }
            }
        }