array
( 'methods' => WP_REST_Server::CREATABLE,
'callback' => array
( $this, 'create_item'
),
'permission_callback' => array
( $this, 'create_item_permissions_check'
),
'args' =>
$this->
get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE
),
),
'allow_batch' =>
$this->allow_batch,
'schema' => array
( $this, 'get_public_item_schema'
),
) );
$schema =
$this->
get_item_schema();
$get_item_args = array
( 'context' =>
$this->
get_context_param( array
( 'default' => 'view'
) ),
);
if ( isset( $schema['properties'
]['password'
] ) ) { $get_item_args['password'
] = array
( 'description' =>
__( 'The password for the post if it is password protected.'
),
'type' => 'string',
);
} register_rest_route( $this->namespace,