Uses
Uses | Description |
---|---|
wp-includes/functions.php: _deprecated_function() | Mark a function as deprecated and inform when it has been used. |
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.
Retrieve a single post, based on post ID.
Has categories in ‘post_category’ property or key. Has tags in ‘tags_input’ property or key.
(int) (Required) Post ID.
(string) (Optional) How to return result, either OBJECT, ARRAY_N, or ARRAY_A.
Default value: OBJECT
(WP_Post|null) Post object or array holding post contents and information
File: wp-includes/deprecated.php
function wp_get_single_post( $postid = 0, $mode = OBJECT ) { _deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' ); return get_post( $postid, $mode ); }
Version | Description |
---|---|
3.5.0 | Use get_post() |
1.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_get_single_post