Save
This commit is contained in:
@@ -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');
|
||||
Reference in New Issue
Block a user