Add Elementor event loop preset library and separate releases
All checks were successful
WordPress release / release (push) Successful in 5s
Loop Builder release / release (push) Successful in 4s

This commit is contained in:
josh
2026-11-13 11:00:14 -05:00
parent db4747d85f
commit d15dce1e84
20 changed files with 3617 additions and 17 deletions

View File

@@ -0,0 +1,35 @@
<?php
defined( 'ABSPATH' ) || exit;
$field = static function ( string $key, array $settings = [] ): array {
return [
'id' => Elementor\Utils::generate_random_string(), 'elType' => 'widget', 'widgetType' => 'eventlabs-loop-field',
'settings' => [ 'field' => $key ] + $settings, 'elements' => [],
];
};
$container = static function ( string $classes, array $children, bool $inner = true ): array {
return [
'id' => Elementor\Utils::generate_random_string(), 'elType' => 'container', 'isInner' => $inner,
'settings' => [ 'content_width' => 'full', 'css_classes' => $classes ], 'elements' => $children,
];
};
$body = $container( 'ell-starter-body', [
$field( 'categories' ),
$field( 'schedule' ),
$field( 'title' ),
$field( 'venue' ),
$field( 'excerpt' ),
$container( 'ell-starter-meta', [ $field( 'cost' ), $field( 'status' ) ] ),
$field( 'link' ),
] );
return [
'compact' === $preset
? $container( 'ell-starter ell-starter-compact', [ $body ], false )
: $container( 'ell-starter ell-starter-photo', [
$container( 'ell-starter-media', [ $field( 'image', [ 'show_placeholder' => 'yes' ] ) ] ),
$body,
], false ),
];