PHP Класс WPCOM_JSON_API_Post_Endpoint, jetpack

Наследование: extends WPCOM_JSON_API_Endpoint
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$post_object_format

Открытые методы

Метод Описание
__construct ( $args ) public $response_format =& $this->post_object_format;
find_featured_media ( WP_Post &$post ) : object Supporting featured media in post endpoints. Currently on for wpcom blogs since it's calling WPCOM_JSON_API_Read_Endpoint methods which presently rely on wpcom specific functionality.
get_attachment ( $attachment ) : (object) Returns attachment object.
get_blog_post ( $blog_id, $post_id, $context = 'display' )
get_current_user_capabilities ( WP_Post $post ) : array Get post-specific user capabilities
get_post_by ( string $field, string $field_value, string $context = 'display' ) : array Get a post by a specified field and value
get_the_post_content_for_display ( ) Expects setup_postdata() to already have been run
is_metadata_public ( $key )
the_password_form ( )
win8_gallery_shortcode ( $attr )

Защищенные методы

Метод Описание
get_post_id_by_name ( string $name ) : integer | object Get post ID by name

Описание методов

__construct() публичный Метод

public $response_format =& $this->post_object_format;
public __construct ( $args )

get_attachment() публичный Метод

Returns attachment object.
public get_attachment ( $attachment ) : (object)
$attachment attachment row
Результат (object)

get_blog_post() публичный Метод

public get_blog_post ( $blog_id, $post_id, $context = 'display' )

get_current_user_capabilities() публичный Метод

Get post-specific user capabilities
public get_current_user_capabilities ( WP_Post $post ) : array
$post WP_Post post object
Результат array array of post-level permissions; 'publish_post', 'delete_post', 'edit_post'

get_post_by() публичный Метод

Get a post by a specified field and value
public get_post_by ( string $field, string $field_value, string $context = 'display' ) : array
$field string
$field_value string
$context string Post use context (e.g. 'display')
Результат array Post

get_post_id_by_name() защищенный Метод

Attempts to match name on post title and page path
protected get_post_id_by_name ( string $name ) : integer | object
$name string
Результат integer | object Post ID on success, WP_Error object on failure

get_the_post_content_for_display() публичный Метод

Expects setup_postdata() to already have been run

is_metadata_public() публичный Метод

public is_metadata_public ( $key )

the_password_form() публичный Метод

public the_password_form ( )

Описание свойств

$post_object_format публичное свойство

public $post_object_format