API / Minn\Runtime / UserStylesPost

UserStylesPost final class

Minn\Runtime\UserStylesPost · public/minn/src/Minn/Runtime/UserStylesPost.php · 51 lines

A theme's user styles post as WordPress's theme.json resolver finds and makes it (probe global-styles-lookup): the newest wp_global_styles post tied to the theme by its wp_theme term, through WP_Query (so plugins hear the query and may steer it), made when asked and missing.

Public

staticdata(mixed $theme, mixed $createPost = false, mixed $statuses = array ( 0 => 'publish', )): array#

A theme's user styles post as an array (WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles): the newest of the statuses given, by the theme's name. When asked to make one and there is none, the post is made for that theme, any theme, its term given as tax_input (so set only for a user who may assign it). [] when there is none.

@return array<string, mixed>
staticid(): int#

The active theme's user styles post id (WP_Theme_JSON_Resolver::get_user_global_styles_post_id), the post made when it is missing.