WP_Theme_JSON::get_settings()publicWP 5.8.0

Returns the existing settings for each block.

Example:

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

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.

WP_Theme_JSON::get_settings() code WP 6.6.2

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