W3cubDocs

/WordPress

WP_Theme_JSON::get_patterns(): string[]

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

Return

string[]

Source

* We rather replace the existing with the incoming value, if it exists.
* This is the case of spacing.units.
*
* For leaf values that are associative arrays it will merge them as expected.
* This is also not the behavior we want for the current associative arrays (presets).
* We rather replace the existing with the incoming value, if it exists.

Changelog

Version Description
6.0.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_theme_json/get_patterns