WordPress at Your Fingertips
function is not described

WP_Theme_JSON::get_settings() public WP 5.8.0

Returns the existing settings for each block.

Example:

{
  'root': {
	'color': {
	  'custom': true
	}
  },
  'core/paragraph': {
	'spacing': {
	  'customPadding': true
	}
  }
}

{} It's a method of the class: WP_Theme_JSON{}

No Hooks.

Return

Array. Settings per block.

Usage

$WP_Theme_JSON = new WP_Theme_JSON();
$WP_Theme_JSON->get_settings();

Changelog

Since 5.8.0 Introduced.

Code of WP_Theme_JSON::get_settings() WP 5.8.2

public function get_settings() {
	if ( ! isset( $this->theme_json['settings'] ) ) {
		return array();
	} else {
		return $this->theme_json['settings'];
	}
}