WP_Theme_JSON::get_patterns() WordPress Method
The WP_Theme_JSON::get_patterns() method is used to get an array of patterns for the theme.
WP_Theme_JSON::get_patterns() #
Returns the current theme’s wanted patterns(slugs) to be registered from Pattern Directory.
Return
(string[])
Source
File: wp-includes/class-wp-theme-json.php
public function get_patterns() { if ( isset( $this->theme_json['patterns'] ) && is_array( $this->theme_json['patterns'] ) ) { return $this->theme_json['patterns']; } return array(); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |