WP_Theme_JSON::get_settings() – Returns the existing settings for each block.

You appear to be a bot. Output may be restricted

Description

Returns the existing settings for each block.

Example:

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

Usage

$array = WP_Theme_JSON::get_settings();

Parameters

Returns

array Settings per block.

Source

File name: wordpress/wp-includes/class-wp-theme-json.php
Lines:

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

 View on GitHub View on Trac