PHP Класс WP_CLI\CommandWithMeta

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

Защищенные свойства (Protected)

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

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

Метод Описание
add ( $args, $assoc_args ) Add a meta field.
delete ( $args, $assoc_args ) Delete a meta field.
get ( $args, $assoc_args ) Get meta field value.
list_ ( $args, $assoc_args ) List all metadata associated with an object.
update ( $args, $assoc_args ) Update a meta field.

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

Метод Описание
check_object_id ( $object_id ) Check that the object ID exists

Приватные методы

Метод Описание
get_fields ( ) : array Get the fields for this object's meta

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

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

## OPTIONS : The ID of the object. : The name of the meta field to create. [] : The value of the meta field. If omitted, the value is read from STDIN. [--format=] : The serialization format for the value. --- default: plaintext options: - plaintext - json ---
public add ( $args, $assoc_args )

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

Check that the object ID exists
protected check_object_id ( $object_id )

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

: The ID of the object. [] : The name of the meta field to delete. [] : The value to delete. If omitted, all rows with key will deleted. [--all] : Delete all meta for the object.
public delete ( $args, $assoc_args )

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

: The ID of the object. : The name of the meta field to get. [--format=] : Accepted values: table, json. Default: table
public get ( $args, $assoc_args )

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

: ID for the object. [--keys=] : Limit output to metadata of specific keys. [--fields=] : Limit the output to specific row fields. Defaults to id,meta_key,meta_value. [--format=] : Accepted values: table, csv, json, count. Default: table
public list_ ( $args, $assoc_args )

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

## OPTIONS : The ID of the object. : The name of the meta field to update. [] : The new value. If omitted, the value is read from STDIN. [--format=] : The serialization format for the value. --- default: plaintext options: - plaintext - json ---
public update ( $args, $assoc_args )

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

$meta_type защищенное свойство

protected $meta_type