WP_Theme_JSON::get_settings(): array

Returns the existing settings for each block.


Description

Example:

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

Top ↑

Return

array Settings per block.


Top ↑

Source

File: wp-includes/class-wp-theme-json.php. View all references

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

Top ↑

Changelog

Changelog
Version Description
5.8.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.