W3cubDocs

/WordPress

WP_Theme_JSON::get_settings(): array

Returns the existing settings for each block.

Description

Example:

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

Return

array Settings per block.

Source

 * inner `blocks`, the overall schema will be generated in multiple passes.
 */
foreach ( $valid_block_names as $block ) {
	$schema_settings_blocks[ $block ]           = static::VALID_SETTINGS;
	$schema_styles_blocks[ $block ]             = $styles_non_top_level;
	$schema_styles_blocks[ $block ]['elements'] = $schema_styles_elements;
}

Changelog

Version Description
5.8.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_theme_json/get_settings