PHP Class Papi_CLI_Post_Command, papi

Inheritance: extends Papi_CLI_Command
Show file Open project: wp-papi/papi

Public Methods

Method Description
get ( array $args, array $assoc_args ) Get fields that exists on a post.

Protected Methods

Method Description
get_default_format_fields ( ) : array Get default fields for formatter.

Method Details

get() public method

## OPTIONS : Post ID [--field=] : Instead of returning the whole post fields, returns the value of a single fields. [--fields=] : Get a specific subset of the post's fields. [--format=] : Accepted values: table, json, csv. Default: table. ## AVAILABLE FIELDS These fields are available for get command: * slug * type * exists ## EXAMPLES wp papi post get 123 --format=json wp papi post get 123 --field=slug
public get ( array $args, array $assoc_args )
$args array
$assoc_args array

get_default_format_fields() protected method

Get default fields for formatter.
protected get_default_format_fields ( ) : array
return array