/** * Converts a page retrieved trough the WordPress method get_page * to a wpws_Page object. * @return wpws_Page */ function convert($page) { return parent::convert($page); }
/** * Returns a post * @return wpws_Post */ function getPost($postId) { $postId = is_numeric($postId) ? intval($postId) : 0; $post = get_post($postId, OBJECT); return wpws_Post::convert($post); }