/** * Run on_post_edit actions against the parent post. This is primarily to trigger W3TC's clear page cache. * Only needs to run if polling is disabled, since polling updates the post content via ajax. */ public static function mark_parent_post_as_edited($data) { if (LiveBlogging_LiveBlogEntry::is_being_edited() && !LiveBlogging_Setting_UpdateMethod::is_enabled()) { $parent_post_id = (int) $_POST['live_blogging_entry_post']; do_action('edit_post', $parent_post_id, get_post($parent_post_id)); } return $data; }
private function load_updater() { if (LiveBlogging_Setting_UpdateMethod::is_enabled()) { $this->add_javascript_assets(); if (LiveBlogging_Setting_UpdateMethod::is_ajax()) { $this->updater = new LiveBlogging_Updater_Ajax(); } elseif (LiveBlogging_Setting_UpdateMethod::is_meteor()) { $this->updater = new LiveBlogging_Updater_Meteor(); } elseif (LiveBlogging_Setting_UpdateMethod::is_timed()) { $this->updater = new LiveBlogging_Updater_Timed(); } } }