wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



wp_get_single_post › WordPress Function

Depuis1.0.0
Dépréciée3.5.0
wp_get_single_post ( $postid = 0, $mode = OBJECT )
Paramètres: (2)
  • (int) $postid Post ID.
    Requis: Non
    Défaut:
  • (string) $mode How to return result, either OBJECT, ARRAY_N, or ARRAY_A.
    Requis: Non
    Défaut: OBJECT
Voir:
Retourne:
  • (WP_Post|null) Post object or array holding post contents and information
Défini(e) dans:
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.


Source

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