[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/ -> class-wp-post.php (summary)

Post API: WP_Post class

File Size: 447 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 6 functions

  get_instance()
  __construct()
  __isset()
  __get()
  filter()
  to_array()

Functions
Functions that are not part of a class:

get_instance( $post_id )   X-Ref
Retrieve WP_Post instance.

return: WP_Post|false Post object, false otherwise.
param: int $post_id Post ID.

__construct( $post )   X-Ref
Constructor.

param: object $post Post object.

__isset( $key )   X-Ref
Isset-er.

return: bool
param: string $key Property to check if set.

__get( $key )   X-Ref
Getter.

return: mixed
param: string $key Key to get.

filter( $filter )   X-Ref
Applies the provided context filter for the current post.

If the requested filter was already applied, then it returns without any changes.

If the 'raw' filter is supplied, then a new instance of the post is obtained and this method _may_ return false
in case the underlying post was deleted.

return: WP_Post|false
param: string $filter Filter.

to_array()   X-Ref
Convert object to array.

return: array<string, mixed> Object as array.



Generated : Thu Jul 16 08:20:16 2026 Cross-referenced by PHPXref