/**
  * Register a new Episode that can be published via Auphonic
  */
 public function ajax_add_episode_for_auphonic_webhook()
 {
     $post_id = $_REQUEST['post_id'];
     $auth_key = $_REQUEST['authkey'];
     $action = $_REQUEST['flag'];
     if (!$post_id || !$action || !$auth_key) {
         return \Podlove\AJAX\AJAX::respond_with_json(false);
     }
     $episodes_to_be_remote_published = get_option('podlove_episodes_to_be_remote_published');
     if (!is_array($episodes_to_be_remote_published)) {
         $episodes_to_be_remote_published = [];
     }
     $episodes_to_be_remote_published[$post_id] = ['post_id' => $post_id, 'auth_key' => $auth_key, 'action' => $action];
     update_option('podlove_episodes_to_be_remote_published', $episodes_to_be_remote_published);
     return \Podlove\AJAX\AJAX::respond_with_json(true);
 }
 public function ajax_preview_alpha_post()
 {
     if (!$_REQUEST['post_id']) {
         return;
     }
     $result = $this->replace_tags($_REQUEST['post_id']);
     return \Podlove\AJAX\AJAX::respond_with_json(array('preview' => $result['text']));
 }