source/php/Ajax.php
public function getPost()
    {
        if (!isset($_POST['id']) || empty($_POST['id']) || is_null($_POST['id'])) {
            echo 'false';
            wp_die();
        }

        echo json_encode(get_post($_POST['id']));
        wp_die();
    }
public function getPost()
    {
        if (!isset($_POST['id']) || empty($_POST['id']) || is_null($_POST['id'])) {
            echo 'false';
            wp_die();
        }

        echo json_encode(get_post($_POST['id']));
        wp_die();
    }
public function getPost ( ) { if ( ! isset ( $ _POST [ 'id' ] ) || empty ( $ _POST [ 'id' ] ) || is_null ( $ _POST [ 'id' ] ) ) { echo 'false' ; wp_die ( ) ; } echo json_encode ( get_post ( $ _POST [ 'id' ] ) ) ; wp_die ( ) ; }
Get a post with ajax
@return string    JSON encoded object
Get a post with ajax