PluginProbe ʕ •ᴥ•ʔ
Zenchef widget integration / 1.2.0
Zenchef widget integration v1.2.0
1.0.1 1.2.0 trunk 1.0.0
zenchef-widget-integration / src / Widget / load_script_template_file.php
zenchef-widget-integration / src / Widget Last commit date
Backoffice 1 month ago build_widget_data_attributes.php 1 month ago get_widget_settings.php 1 month ago load_script_file.php 1 month ago load_script_template_file.php 1 month ago load_translations.php 1 year ago register_shortcode.php 1 month ago sanitize_restaurant_id.php 1 month ago sanitize_widget_settings.php 1 month ago
load_script_template_file.php
26 lines
1 <?php
2
3 namespace Zenchef\Widget\Widget;
4
5 use function Zenchef\Widget\View\render;
6
7 /**
8 * @return string
9 */
10 function load_script_template_file()
11 {
12 if (widget_shortcode_was_rendered()) {
13 return '';
14 }
15
16 $settings = get_widget_settings();
17
18 return render(
19 'main',
20 [
21 'restaurant_id' => $settings['restaurant_id'],
22 'data_attributes' => build_widget_data_attributes($settings),
23 ]
24 );
25 }
26