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

You appear to be a bot. Output may be restricted

Description

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

Usage

$string[] = WP_Theme_JSON::get_patterns();

Parameters

Returns

string[]

Source

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


Lines:

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

 View on GitHub View on Trac