function get_post_title($post_id)
{
    $output = false;
    if (post_exist((int) $post_id)) {
        $post = get_post_data_byID((int) $post_id);
        $output = $post['title'];
    }
    return $output;
}
     //Some Editor variables
     $editor_title = 'New Post';
     $url_container = 'data-target';
     $admin_action = '?action=editpost&postid=' . $post_id;
     $draft_bt = 'draftnew';
 } else {
     if ($_GET['action'] == 'editpost' && isset($_GET['postid'])) {
         //Set variables for editor and post being edited
         //Some Editor Variables
         $editor_title = 'Edit Post';
         $url_container = 'data-no-target';
         $publish_bt = 'save';
         $admin_action = '?action=editpost&postid=' . $_GET['postid'];
         $draft_bt = get_post_status($_GET['postid']) === 'DRAFT' ? 'publishdraft' : 'draftsaved';
         //Get requested post, must typecast id to int.
         $post = get_post_data_byID((int) $_GET['postid']);
         $post_id = $post['id'];
         $post_title = $post['title'];
         $post_date = $post['date'];
         $post_url = $post['url'];
         $post_author = $post['author']['name'];
         $post_author_id = $post['author']['id'];
         $post_author_url = $post['author']['url'];
         $post_excerpt = $post['excerpt'];
         $post_image = isset($post['image']) && !empty($post['image']) ? sprintf('<figure><img src="%1$s" alt="%2$s"/></figure>', UPLOADURL . $post['image'], $post['image']) : '<p>No image found, try uploading one.</p>';
         $post_content = get_post_content_byID($post_id);
         $post_comments = $post['comments']['enable'];
         $post_comment_option = post_has_comments((int) $post['id']) ? 'disabled' : '';
         $post_comment_hidden = post_has_comments((int) $post['id']) ? '1' : '0';
         $post_comment_text = post_has_comments((int) $post['id']) ? '<p>Users have posted comments in this post, you cannot change this option.</p>' : '';
     }