функция
since 4.7.0
get_registered_settings()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
get_registered_settings(): array
Описание
Возвращает массив зарегистрированных настроек.
Возвращаемое значение
array
...$0 array Data used to describe the setting when registered. type stringThe type of data associated with this setting. Valid values are 'string', 'boolean', 'integer', 'number', 'array', and 'object'. label stringA label of the data attached to this setting. description stringA description of the data attached to this setting. sanitize_callback callableA callback function that sanitizes the option’s value. show_in_rest bool|arrayWhether data associated with this setting should be included in the REST API. When registering complex settings, this argument may optionally be an array with a 'schema' key. default mixedDefault value when calling get_option(). Source function get_registered_settings() { global $wp_registered_settings; if ( ! is_array( $wp_registered_settings ) ) { return array(); } return $wp_registered_settings; }
Исходный код
wp-includes/option.php:3214
function get_registered_settings() {
global $wp_registered_settings;
if ( ! is_array( $wp_registered_settings ) ) {
return array();
}
return $wp_registered_settings;
}
История изменений
| Версия | Описание |
|---|---|
| 4.7.0 | Introduced. |

