PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.8
Booking for Appointments and Events Calendar – Amelia v2.4.8
2.4.8 2.4.7 2.4.6 2.4.5 2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / extensions / divi_5_amelia / server / SharedShortcodeModule.php
ameliabooking / extensions / divi_5_amelia / server Last commit date
AmeliaBookingButtonRendererTrait.php 3 months ago AmeliaBookingModule.php 1 day ago AmeliaCatalogBookingModule.php 1 day ago AmeliaCatalogModule.php 1 day ago AmeliaCatalogShortcodeHelper.php 1 day ago AmeliaCustomerPanelModule.php 1 day ago AmeliaEmployeePanelModule.php 1 day ago AmeliaEventsCalendarModule.php 1 day ago AmeliaEventsListBookingButtonModule.php 1 day ago AmeliaEventsListModule.php 1 day ago AmeliaEventsModule.php 1 day ago AmeliaSearchModule.php 1 day ago AmeliaStepBookingButtonModule.php 1 day ago AmeliaStepBookingModule.php 1 day ago ModuleMetadata.php 2 months ago SharedShortcodeModule.php 2 months ago index.php 1 day ago
SharedShortcodeModule.php
49 lines
1 <?php
2
3 namespace Divi5Amelia;
4
5 use ET\Builder\Framework\DependencyManagement\Interfaces\DependencyInterface;
6
7 /**
8 * Class that handle shared booking module output in frontend.
9 */
10 abstract class SharedShortcodeModule implements DependencyInterface
11 {
12 /**
13 * Get shared shortcode string from attributes.
14 *
15 * @param array $attrs Attributes array.
16 * @return string Shared shortcode string.
17 */
18 public static function getSharedShortcodeString($attrs)
19 {
20 $shortcode = '';
21
22 // Trigger
23 $trigger = $attrs['trigger']['innerContent']['desktop']['value'] ?? null;
24 if ($trigger !== null && $trigger !== '') {
25 $shortcode .= ' trigger=' . esc_attr($trigger);
26 }
27
28 // Trigger Type
29 $trigger_type = $attrs['trigger_type']['innerContent']['desktop']['value'] ?? null;
30 if ($trigger && $trigger_type !== null && $trigger_type !== '') {
31 $shortcode .= ' trigger_type=' . esc_attr($trigger_type);
32 }
33
34 // In Dialog
35 $in_dialog = $attrs['in_dialog']['innerContent']['desktop']['value'] ?? false;
36 if ($in_dialog === 'on') {
37 $shortcode .= ' in_dialog=1';
38 }
39
40 // Ivy
41 $ivy = $attrs['ivy']['innerContent']['desktop']['value'] ?? null;
42 if ($ivy !== null && $ivy !== '' && !$trigger) {
43 $shortcode .= ' ivy=' . esc_attr($ivy);
44 }
45
46 return $shortcode;
47 }
48 }
49