PHP Class WPCOM_JSON_API_Post_Endpoint, jetpack

Inheritance: extends WPCOM_JSON_API_Endpoint
Exibir arquivo Open project: automattic/jetpack Class Usage Examples

Public Properties

Property Type Description
$post_object_format

Public Methods

Method Description
__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 )

Protected Methods

Method Description
get_post_id_by_name ( string $name ) : integer | object Get post ID by name

Method Details

__construct() public method

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

get_attachment() public method

Returns attachment object.
public get_attachment ( $attachment ) : (object)
$attachment attachment row
return (object)

get_blog_post() public method

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

get_current_user_capabilities() public method

Get post-specific user capabilities
public get_current_user_capabilities ( WP_Post $post ) : array
$post WP_Post post object
return array array of post-level permissions; 'publish_post', 'delete_post', 'edit_post'

get_post_by() public method

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')
return array Post

get_post_id_by_name() protected method

Attempts to match name on post title and page path
protected get_post_id_by_name ( string $name ) : integer | object
$name string
return integer | object Post ID on success, WP_Error object on failure

get_the_post_content_for_display() public method

Expects setup_postdata() to already have been run

is_metadata_public() public method

public is_metadata_public ( $key )

the_password_form() public method

public the_password_form ( )

Property Details

$post_object_format public_oe property

public $post_object_format