Core Function
View Source on Trac ↗ wp_get_post_revision()
wp_get_post_revision( mixed $post, mixed $output = OBJECT, mixed $filter = 'raw' ) Gets a post revision.
Parameters 2 required
| Name / Type | Description |
|---|---|
| (int | | WP_Post) $post Post ID or post object. Required |
| string | $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT. Required |
| $filter string | Optional sanitization filter. See sanitize_post(). Default 'raw'. |
Return Value
((WP_Post)
| array | null) WP_Post (or array) on success, or null on failure.
Function Information
Since Version
2.6.0
Source File
wp-includes/revision.php
Advertisement