Title: WP_View_Config_Data::__construct
Published: August 20, 2026

---

# WP_View_Config_Data::__construct( array $config )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/wp_view_config_data/__construct/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/classes/wp_view_config_data/__construct/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_view_config_data/__construct/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_view_config_data/__construct/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_view_config_data/__construct/?output_format=md#wp--skip-link--target)

Constructor.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wp_view_config_data/__construct/?output_format=md#parameters)󠁿

 `$config`arrayrequired

The base configuration to contribute to.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_view_config_data/__construct/?output_format=md#source)󠁿

    ```php
    public function __construct( array $config ) {
    	$this->config   = $config;
    	$this->defaults = $config;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-view-config-data.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/class-wp-view-config-data.php#L99)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/class-wp-view-config-data.php#L99-L102)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_view_config_data/__construct/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_get_entity_view_config()](https://developer.wordpress.org/reference/functions/wp_get_entity_view_config/)`wp-includes/view-config.php` |

Returns the view configuration for the given entity.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_view_config_data/__construct/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.1.0](https://developer.wordpress.org/reference/since/7.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_view_config_data%2F__construct%2F)
before being able to contribute a note or feedback.