Publish eventLabs 0.5.0
This commit is contained in:
47
includes/starter-layout.php
Normal file
47
includes/starter-layout.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$widget = static function ( string $name, array $settings = [] ): array {
|
||||
return [
|
||||
'id' => Elementor\Utils::generate_random_string(),
|
||||
'elType' => 'widget', 'widgetType' => $name,
|
||||
'settings' => $settings, 'elements' => [],
|
||||
];
|
||||
};
|
||||
|
||||
$field = static fn( string $key ): array => $widget( 'burn-events-field', [ 'field' => $key ] );
|
||||
$event = static fn( string $key ): array => $widget( 'burn-events-event-' . $key );
|
||||
|
||||
$container = static function ( string $class, array $children, bool $inner = true ): array {
|
||||
return [
|
||||
'id' => Elementor\Utils::generate_random_string(), 'elType' => 'container', 'isInner' => $inner,
|
||||
'settings' => [ 'content_width' => 'full', 'css_classes' => $class ], 'elements' => $children,
|
||||
];
|
||||
};
|
||||
|
||||
return [
|
||||
$container( 'be-starter be-single-layout', [
|
||||
$container( 'be-layout-nav', [ $field( 'back' ), $field( 'terms' ) ] ),
|
||||
$container( 'be-layout-hero', [
|
||||
$container( 'be-layout-title', [ $event( 'title' ), $event( 'schedule' ), $field( 'status' ) ] ),
|
||||
$container( 'be-layout-photo', [ $event( 'image' ) ] ),
|
||||
] ),
|
||||
$container( 'be-layout-body', [
|
||||
$container( 'be-layout-reading', [
|
||||
$container( 'be-layout-overview', [
|
||||
$widget( 'heading', [ 'title' => __( 'About the event', 'burn-events' ), 'header_size' => 'h2' ] ),
|
||||
$event( 'description' ), $field( 'fields' ),
|
||||
] ),
|
||||
$container( 'be-layout-calendar', [
|
||||
$widget( 'heading', [ 'title' => __( 'Add to calendar', 'burn-events' ), 'header_size' => 'h2' ] ),
|
||||
$event( 'export' ),
|
||||
] ),
|
||||
] ),
|
||||
$container( 'be-layout-details', [
|
||||
$event( 'cost' ), $event( 'venue' ), $event( 'organizer' ), $field( 'series' ), $field( 'website' ),
|
||||
] ),
|
||||
] ),
|
||||
$event( 'related' ),
|
||||
], false ),
|
||||
];
|
||||
Reference in New Issue
Block a user