evavel_ajaxurl(), 'languages' => evavel_languages_as_options(), 'widget_autofill_reservation_form' => ($autofill == 'true' || $autofill === true) ? 'true' : 'false', 'is_logged_in' => is_user_logged_in() ? 'true' : 'false', 'current_user' => [ 'first_name' => $current_user->first_name, 'last_name' => $current_user->last_name, 'email' => $current_user->user_email ] ]; } /** * Allow only specific hook * @param $tag * @param $hook_allowed * * @return void */ function alexr_limit_hooks_to_one($tag = 'wp_footer', $hooks_allowed = ['wp_print_footer_scripts', 'wp_enqueue_global_styles']) { global $wp_filter; //echo '
'; print_r($wp_filter[$tag]->callbacks); echo ''; foreach($wp_filter[$tag]->callbacks as $key => $list){ foreach($list as $hook_name => $value) { if ( !in_array($hook_name, $hooks_allowed)) { unset($wp_filter[$tag]->callbacks[$key][$hook_name]); } } } //echo '
'; print_r($wp_filter[$tag]->callbacks); echo ''; } function alexr_get_pixel_code($booking_uuid, $notification_id = null) { if (defined('ALEXR_PRO_VERSION')) { return (new \Alexr\Email\PixelTracking())->get_pixel_code($booking_uuid, $notification_id ? $notification_id : 0); } else { $pixel_code = null; } return $pixel_code; }