Exemplo n.º 1
0
 /**
  * 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;
 }
Exemplo n.º 2
0
 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();
         }
     }
 }
Exemplo n.º 3
0
 public function register_page()
 {
     if (LiveBlogging_Setting_UpdateMethod::is_meteor()) {
         add_submenu_page('index.php', __('Meteor Status', 'live-blogging'), __('Meteor Status', 'live-blogging'), 'manage_options', 'live-blogging-meteor-status', array($this, 'render_page'));
     }
 }