WP_Theme_JSON::get_patterns
Returns the current theme's wanted patterns(slugs) to be registered from Pattern Directory.
Метод класса: WP_Theme_JSON{}
Хуков нет.
Возвращает
string[].
Использование
$WP_Theme_JSON = new WP_Theme_JSON(); $WP_Theme_JSON->get_patterns();
Список изменений
| С версии 6.0.0 | Введена. |
Код WP_Theme_JSON::get_patterns() WP Theme JSON::get patterns WP 7.1.2
public function get_patterns() {
if ( isset( $this->theme_json['patterns'] ) && is_array( $this->theme_json['patterns'] ) ) {
return $this->theme_json['patterns'];
}
return array();
}