wp network
Выполнение операций с сетью сайтов.
Список команд | Описание |
---|---|
wp network meta list | Список всех метаданных, связанных с сетью. |
wp network meta get | Получает значение мета-поля. |
wp network meta delete | Удаляет мета-поле. |
wp network meta add | Добавляет мета-поле. |
wp network meta update | Обновляет мета-поля. |
wp network meta pluck | Получает вложенное значение из мета-поля (из сериал-го массива). |
wp network meta patch | Обновляет вложенные значения мета-поля (сериал-го массива). |
Примеры
# Get a list of super-admins $ wp network meta get 1 site_admins array ( 0 => 'supervisor', )
Исходный код команд
wp network meta list
Список всех метаданных, связанных с сетью.
Использование
wp network meta list {id} [--keys={keys}] [--fields={fields}] [--format={format}] [--orderby={fields}] [--order={order}]
Можно указать Глобальные параметры и следующие:
- {id}
- ID for the object.
- [--keys={keys}]
- Limit output to metadata of specific keys.
- [--fields={fields}]
- Limit the output to specific row fields. Defaults to id,meta_key,meta_value.
- [--format={format}]
Render output in a particular format.
По умолчанию: table
Может быть:- table
- csv
- json
- yaml
- count
- [--orderby={fields}]
Set orderby which field.
По умолчанию: id
Может быть:- id
- meta_key
- meta_value
- [--order={order}]
Set ascending or descending order.
По умолчанию: asc
Может быть:- asc
- desc
wp network meta get
Получает значение мета-поля.
Использование
wp network meta get {id} {key} [--format={format}]
Можно указать Глобальные параметры и следующие:
- {id}
- The ID of the object.
- {key}
- The name of the meta field to get.
- [--format={format}]
Get value in a particular format.
По умолчанию: var_export
Может быть:- var_export
- json
- yaml
wp network meta delete
Удаляет мета-поле.
Использование
wp network meta delete {id} [{key}] [{value}] [--all]
Можно указать Глобальные параметры и следующие:
- {id}
- The ID of the object.
- [{key}]
- The name of the meta field to delete.
- [{value}]
- The value to delete. If omitted, all rows with key will deleted.
- [--all]
- Delete all meta for the object.
wp network meta add
Добавляет мета-поле.
Использование
wp network meta add {id} {key} [{value}] [--format={format}]
Можно указать Глобальные параметры и следующие:
- {id}
- The ID of the object.
- {key}
- The name of the meta field to create.
- [{value}]
- The value of the meta field. If omitted, the value is read from STDIN.
- [--format={format}]
The serialization format for the value.
По умолчанию: plaintext
Может быть:- plaintext
- json
wp network meta update
Обновляет мета-поля.
Использование
wp network meta update {id} {key} [{value}] [--format={format}]
Можно указать Глобальные параметры и следующие:
- {id}
- The ID of the object.
- {key}
- The name of the meta field to update.
- [{value}]
- The new value. If omitted, the value is read from STDIN.
- [--format={format}]
The serialization format for the value.
По умолчанию: plaintext
Может быть:- plaintext
- json
wp network meta pluck
Получает вложенное значение из мета-поля (из сериал-го массива).
Использование
wp network meta pluck {id} {key} {key-path}... [--format={format}]
Можно указать Глобальные параметры и следующие:
- {id}
- The ID of the object.
- {key}
- The name of the meta field to get.
- {key-path}...
- The name(s) of the keys within the value to locate the value to pluck.
- [--format={format}]
- The output format of the value.
--- По умолчанию: plaintext
Может быть:
- plaintext
- json
- yaml
Примеры
Смотрите здесь
wp network meta patch
Обновляет вложенные значения мета-поля (сериал-го массива).
Использование
wp network meta patch {action} {id} {key} {key-path}... [{value}] [--format={format}]
Можно указать Глобальные параметры и следующие:
- {action}
Patch action to perform.
Может быть:
- insert
- update
- delete
- {id}
- The ID of the object.
- {key}
- The name of the meta field to update.
- {key-path}...
- The name(s) of the keys within the value to locate the value to patch.
- [{value}]
- The new value. If omitted, the value is read from STDIN.
- [--format={format}]
The serialization format for the value.
По умолчанию: plaintext
Может быть:- plaintext
- json
Примеры
Смотрите здесь