WP_Theme_JSON::get_settings()
Returns the existing settings for each block.
Example:
{ 'root': { 'color': { 'custom': true } }, 'core/paragraph': { 'spacing': { 'customPadding': true } } }
Метод класса: WP_Theme_JSON{}
Хуков нет.
Возвращает
Массив
. Settings per block.
Использование
$WP_Theme_JSON = new WP_Theme_JSON(); $WP_Theme_JSON->get_settings();
Список изменений
С версии 5.8.0 | Введена. |
Код WP_Theme_JSON::get_settings() WP Theme JSON::get settings WP 6.2.2
public function get_settings() { if ( ! isset( $this->theme_json['settings'] ) ) { return array(); } else { return $this->theme_json['settings']; } }