Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_get_single_post ›

Da1.0.0
Deprecato3.5.0
wp_get_single_post ( $postid = 0, $mode = OBJECT )
Parametri: (2)
  • (int) $postid Post ID.
    Richiesto: No
    Default:
  • (string) $mode How to return result, either OBJECT, ARRAY_N, or ARRAY_A.
    Richiesto: No
    Default: OBJECT
Vedi:
Ritorna:
  • (WP_Post|null) Post object or array holding post contents and information
Definito a:
Codex:

Retrieve a single post, based on post ID.

Has categories in 'post_category' property or key. Has tags in 'tags_input' property or key.



Sorgenti

function wp_get_single_post( $postid = 0, $mode = OBJECT ) {
	_deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' );
	return get_post( $postid, $mode );
}