PHP Class Papi_REST_API_Post, papi

Afficher le fichier Open project: wp-papi/papi

Protected Properties

Свойство Type Description
$store Papi_Post_Store The post store class.

Méthodes publiques

Méthode Description
__construct ( ) REST API Post construct.
get_page_type ( array $data, string $field_name, WP_REST_Request $request ) : array Get page type.
get_post ( WP_Post $post ) : WP_Post Filter the post.
prepare_response ( WP_REST_Response $response ) : WP_REST_Response Prepare response.
setup_fields ( ) Setup REST API fields.

Méthodes protégées

Méthode Description
prepare_property_value ( string $slug, mixed $default = null ) : mixed Prepare property value.

Method Details

__construct() public méthode

REST API Post construct.
public __construct ( )

get_page_type() public méthode

Get page type.
public get_page_type ( array $data, string $field_name, WP_REST_Request $request ) : array
$data array
$field_name string
$request WP_REST_Request
Résultat array

get_post() public méthode

Register all properties with register_meta and prepare response filter.
public get_post ( WP_Post $post ) : WP_Post
$post WP_Post
Résultat WP_Post

prepare_property_value() protected méthode

Prepare property value.
protected prepare_property_value ( string $slug, mixed $default = null ) : mixed
$slug string
$default mixed
Résultat mixed

prepare_response() public méthode

Prepare response.
public prepare_response ( WP_REST_Response $response ) : WP_REST_Response
$response WP_REST_Response
Résultat WP_REST_Response

setup_fields() public méthode

Setup REST API fields.
public setup_fields ( )

Property Details

$store protected_oe property

The post store class.
protected Papi_Post_Store $store
Résultat Papi_Post_Store