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



get_page › WordPress Function

Depuis1.5.1
Dépréciée3.5.0
get_page ( $page, $output = OBJECT, $filter = 'raw' )
Paramètres: (3)
  • (int|WP_Post) $page Page object or page ID. Passed by reference.
    Requis: Oui
  • (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.
    Requis: Non
    Défaut: OBJECT
  • (string) $filter Optional. How the return value should be filtered. Accepts 'raw', 'edit', 'db', 'display'. Default 'raw'.
    Requis: Non
    Défaut: 'raw'
Retourne:
  • (WP_Post|array|null) WP_Post or array on success, null on failure.
Défini(e) dans:
Codex:

Retrieves page data given a page ID or page object.

Use get_post() instead of get_page().


Source

function get_page( $page, $output = OBJECT, $filter = 'raw' ) {
	return get_post( $page, $output, $filter );
}