User_Theme
in package
This class is responsible for managing and accessing theme data aka email styles created by users.
Table of Contents
- INITIAL_THEME_DATA = array('version' => 3, 'isGlobalStylesUserThemeJSON' => true)
- USER_THEME_POST_NAME = 'wp-global-styles-mailpoet-email'
- $user_theme_post : WP_Post|null
- Core theme loaded from the WordPress core.
- get_theme() : WP_Theme_JSON
- Getter for user theme.
- get_user_theme_post() : WP_Post
- Getter for user theme post.
- ensure_theme_post() : void
- Ensures that the user theme post exists and is loaded.
Constants
INITIAL_THEME_DATA
private
mixed
INITIAL_THEME_DATA
= array('version' => 3, 'isGlobalStylesUserThemeJSON' => true)
USER_THEME_POST_NAME
private
mixed
USER_THEME_POST_NAME
= 'wp-global-styles-mailpoet-email'
Properties
$user_theme_post
Core theme loaded from the WordPress core.
private
WP_Post|null
$user_theme_post
= null
Methods
get_theme()
Getter for user theme.
public
get_theme() : WP_Theme_JSON
Tags
Return values
WP_Theme_JSON —get_user_theme_post()
Getter for user theme post.
public
get_user_theme_post() : WP_Post
If the post does not exist, it will be created.
Tags
Return values
WP_Post —ensure_theme_post()
Ensures that the user theme post exists and is loaded.
private
ensure_theme_post() : void