WP_Theme_JSON::get_patterns(): string[]

Returns the current theme’s wanted patterns(slugs) to be registered from Pattern Directory.


Return

string[]


Top ↑

Source

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

public function get_patterns() {
	if ( isset( $this->theme_json['patterns'] ) && is_array( $this->theme_json['patterns'] ) ) {
		return $this->theme_json['patterns'];
	}
	return array();
}

Top ↑

Changelog

Changelog
Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes

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