WP_Theme_JSON::get_patterns()
Returns the current theme's wanted patterns(slugs) to be registered from Pattern Directory.
Method of the class: WP_Theme_JSON{}
No Hooks.
Return
String[]
.
Usage
$WP_Theme_JSON = new WP_Theme_JSON(); $WP_Theme_JSON->get_patterns();
Changelog
Since 6.0.0 | Introduced. |
WP_Theme_JSON::get_patterns() WP Theme JSON::get patterns code WP 6.6.2
public function get_patterns() { if ( isset( $this->theme_json['patterns'] ) && is_array( $this->theme_json['patterns'] ) ) { return $this->theme_json['patterns']; } return array(); }