// Leaflet laden (nur auf Seiten, die die Karte brauchen – hier global einfach): add_action('wp_enqueue_scripts', function () { wp_register_style('leaflet', 'https://unpkg.com/leaflet@1.9.4/dist/leaflet.css', [], '1.9.4'); wp_register_script('leaflet', 'https://unpkg.com/leaflet@1.9.4/dist/leaflet.js', [], '1.9.4', true); }); // ACF Felder in REST liefern (falls in ACF nicht aktiv): add_action('rest_api_init', function () { register_rest_field('destination', 'acf', [ 'get_callback' => function ($obj) { return function_exists('get_fields') ? get_fields($obj['id']) : null; }, 'schema' => null, ]); });