This commit is contained in:
2026-03-05 15:16:42 +01:00
parent 0c6ff3c3c2
commit 530a6f0c27
5 changed files with 199 additions and 3 deletions

View File

@@ -286,4 +286,25 @@ add_action( 'wp_enqueue_scripts', function() {
);
}
}, PHP_INT_MAX );
}, PHP_INT_MAX );
function he_garage_map_shortcode($atts = [], $content = null, $tag = '') {
$atts = shortcode_atts([
// 'example' => '',
], $atts, $tag);
$template = locate_template('template-parts/garage-map.php', false, false);
if (empty($template) || !file_exists($template)) {
return '<!-- garage-map.php not found -->';
}
ob_start();
$garage_map_atts = $atts;
include $template;
return ob_get_clean();
}
add_shortcode('garage_map', 'he_garage_map_shortcode');