public function load_markup_old() { $data = json_decode(stripslashes($_POST['data']), true); if (!is_numeric($data['post_id'])) { die('error'); } $content = ''; if ($data['post_id']) { $post = get_post($data['post_id']); if (!$post) { return $this->_out(new Upfront_JsonResponse_Error('Unknown post.')); } if ($post->post_status == 'trash') { $content = '<div class="ueditor_deleted_post ueditable upfront-ui">' . sprintf(Upfront_ThisPostView::_get_l10n('thrashed_post'), $post->post_type, $post->post_type) . '</div>'; } else { $content = Upfront_ThisPostView::get_post_markup($data['post_id'], null, $data['properties']); } } else { if ($data['post_type']) { $content = Upfront_ThisPostView::get_new_post_contents($data['post_type'], $data['properties']); } else { $this->_out(new Upfront_JsonResponse_Error('Not enough data.')); } } $this->_out(new Upfront_JsonResponse_Success(array("filtered" => $content))); }