EPL_Elementor_Template_Seeder Class
Seeds the plugin's bundled Elementor templates on install and on upgrade.
Seeding is deliberately idempotent and non-destructive:
epl_elementor_bundled_templates option, so an upgrade never produces
duplicates.| Since | |
|---|---|
3.5.0 |
|
| Methods | ||||||
|---|---|---|---|---|---|---|
public
|
__construct()
Class constructor.
Class constructor. Since
|
# | ||||
public
static
|
get_bundled_templates(): array
The templates bundled with this plugin.
The templates bundled with this plugin.
Since
|
# | ||||
public
|
maybe_seed(): void
Install any bundled template that is not yet present, and refresh any
that the user has left untouched when a newer…
Install any bundled template that is not yet present, and refresh any that the user has left untouched when a newer design ships. Since
|
# | ||||
public
static
|
get_template_id(string $slug): int
The post ID of an installed bundled template.
The post ID of an installed bundled template. Parameters
ReturnsPost ID, or 0 when not installed or no longer published. Since
|
# | ||||
public
static
|
get_default_card_id(): int
The bundled card used as the out-of-the-box default listing card.
The bundled card used as the out-of-the-box default listing card. ReturnsPost ID, or 0 when unavailable. Since
|
# | ||||
| Constants | ||
|---|---|---|
public
|
STATE_OPTION = 'epl_elementor_bundled_templates'
Option storing the install state of each bundled template.
Option storing the install state of each bundled template. Shape: array( slug => array( 'post_id' => int, 'checksum' => string, 'version' => string ) ). |
# |
public
|
SLUG_META = '_epl_bundled_template'
Marks a post as having been created by this seeder, and with which slug.
Marks a post as having been created by this seeder, and with which slug. |
# |