To create the map and mapper as written by kodee

document.addEventListener(‘DOMContentLoaded’, function () { const map = L.map(‘treasure-map’).setView([51.5033, -0.1196], 12); L.tileLayer(‘https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png’, { attribution: ‘© OpenStreetMap contributors’ }).addTo(map); const items = document.querySelectorAll(‘.treasure-item’); const markers = []; items.forEach(function (item) { const lat = Number(item.dataset.lat); const lng = Number(item.dataset.lng); if (!Number.isFinite(lat) || !Number.isFinite(lng))…Continue reading

A PHP snippet code to be pasted according to the AI kobee

add_action(‘wp_enqueue_scripts’, function () { if (!is_page(2029)) { return; } wp_enqueue_style( ‘leaflet-css’, ‘https://unpkg.com/[email protected]/dist/leaflet.css’, array(), ‘1.9.4’ ); wp_enqueue_script( ‘leaflet-js’, ‘https://unpkg.com/[email protected]/dist/leaflet.js’, array(), ‘1.9.4’, true ); wp_add_inline_script(‘leaflet-js’, ” document.addEventListener(‘DOMContentLoaded’, function () { const mapElement = document.getElementById(‘treasure-map’); if (!mapElement || typeof L === ‘undefined’) return;…Continue reading

Add Security Headers

function add_security_headers() { header(“Strict-Transport-Security: max-age=31536000; includeSubDomains; preload”); // header(“Content-Security-Policy: default-src ‘self’; img-src ‘self’ data: https:; script-src ‘self’ ‘unsafe-inline’ https:; style-src ‘self’ ‘unsafe-inline’ https:; frame-ancestors ‘self’”); header(“X-Frame-Options: SAMEORIGIN”); header(“X-Content-Type-Options: nosniff”); header(“X-XSS-Protection: 1; mode=block”); header(“Referrer-Policy: strict-origin-when-cross-origin”); header(“Permissions-Policy: camera=(), microphone=(), geolocation=()”); } add_action(‘send_headers’,…Continue reading

Add CC Mail

add_filter(‘wp_mail’, ‘add_cc_to_wp_mail’, 10, 1); function add_cc_to_wp_mail($args) { // Specify the CC email address $cc_email = ‘[email protected]’; // Check if headers are an array or string if (is_array($args[‘headers’])) { $args[‘headers’][] = ‘Cc: ‘ . $cc_email; } else { $args[‘headers’] .= ‘Cc:…Continue reading