add_site_option()
Adds a new option for the current network.
Existing options will not be updated. Note that prior to 3.3 this wasn't the case.
Хуков нет.
Возвращает
bool. True if the option was added, false otherwise.
Использование
add_site_option( $option, $value );
- $option(строка) (обязательный)
- Name of the option to add. Expected to not be SQL-escaped.
- $value(разное) (обязательный)
- Option value, can be anything. Expected to not be SQL-escaped.
Заметки
| Смотрите: add_network_option() |
Список изменений
| С версии 2.8.0 | Введена. |
| С версии 4.4.0 | Modified into wrapper for add_network_option() |
Код add_site_option() add site option WP 7.1
function add_site_option( $option, $value ) {
return add_network_option( null, $option, $value );
}