Skip to content

Commit

Permalink
Merge branch 'hotfix/1.1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
gkaicb committed May 22, 2024
2 parents c77aeb0 + a6bef0f commit cc7ae7f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gnahs-wp-tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: GNA Hotel Solutions WordPress Tools
* Plugin URI: https://www.gnahs.com
* Description: WordPress Hotel Tools developed by GNAHS
* Version: 1.1.3
* Version: 1.1.4
* Author: GNA Hotel Solutions
* Author URI: https://www.gnahs.com
* License: GPLv2 o posterior
Expand Down
16 changes: 16 additions & 0 deletions includes/booking-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,22 @@ function gnahs_my_booking_shortcode($atts)
}
add_shortcode('gnahs-my-booking', 'gnahs_my_booking_shortcode');

// Shortcode para cargar agencias
function gnahs_agencies_shortcode($atts)
{
$atts = shortcode_atts(
array(
'uuid' => get_option('gnahsengine_uuid', ''),
),
$atts
);

ob_start();
include(plugin_dir_path(__FILE__) . '../views/agencies.php');
return ob_get_clean();
}
add_shortcode('gnahs-agencies', 'gnahs_agencies_shortcode');

// Registra la página "booking"
function gnahs_create_booking_page()
{
Expand Down
9 changes: 9 additions & 0 deletions views/agencies.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div id="GNAHS-agencies"></div>

<script>
window.GNAHS_Agencies = window.GNAHS_Agencies || {}
window.GNAHS_Agencies.locale = window.GNAHS_Agencies.locale || '<?= get_locale() ?>'
window.GNAHS_Agencies.uuid = window.GNAHS_Agencies.uuid || '<?= $atts['uuid'] ?>'
</script>

<script type="module" src="https://assets.gnahs.com/services/agencies/v1/launcher.js"></script>

0 comments on commit cc7ae7f

Please sign in to comment.