Uses
Uses | Description |
---|---|
wp-includes/post.php: get_post() | Retrieves post data given a post ID or post object. |
This function has been deprecated. Use get_post() instead.
Retrieves page data given a page ID or page object.
Use get_post() instead of get_page().
(int|WP_Post) (Required) Page object or page ID. Passed by reference.
(string) (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 value: OBJECT
(string) (Optional) How the return value should be filtered. Accepts 'raw', 'edit', 'db', 'display'.
Default value: 'raw'
(WP_Post|array|null) WP_Post or array on success, null on failure.
File: wp-includes/post.php
function get_page( $page, $output = OBJECT, $filter = 'raw' ) { return get_post( $page, $output, $filter ); }
Version | Description |
---|---|
3.5.0 | Use get_post() |
1.5.1 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_page