{"mu_plugin":"<?php\n\/*\nPlugin Name: Escuela La Mar - Performance & Instant Navigation Engine\nDescription: Ultra-fast TTFB, Speculation Rules Instant Hover Prefetcher, LCP preloading, Menu Dropdown Speed & Smart Router.\nVersion: 6.0\nAuthor: Escuela N\u00e1utica La Mar\n*\/\n\nif (!defined('ABSPATH')) exit;\n\n\/\/ 1. SPECULATION RULES API & INSTANT HOVER PREFETCHER (Instant 0ms Page Navigation)\nadd_action('wp_head', function() {\n    if (is_admin()) return;\n    ?>\n    <script type=\"speculationrules\">\n    {\n      \"prefetch\": [\n        {\n          \"source\": \"list\",\n          \"urls\": [\n            \"<?php echo home_url('\/'); ?>\",\n            \"<?php echo home_url('\/licencia-de-navegacion\/'); ?>\",\n            \"<?php echo home_url('\/test-de-examen\/'); ?>\",\n            \"<?php echo home_url('\/tests-navegacion\/'); ?>\",\n            \"<?php echo home_url('\/curso-per-patron-embarcaciones-de-recreo-malaga\/'); ?>\",\n            \"<?php echo home_url('\/patron-de-yate\/'); ?>\",\n            \"<?php echo home_url('\/capitan-de-yate\/'); ?>\",\n            \"<?php echo home_url('\/cursos-de-navegacion-fechas-y-horarios\/'); ?>\",\n            \"<?php echo home_url('\/tests-de-navegacion-de-capitan-de-yate\/'); ?>\"\n          ]\n        }\n      ],\n      \"prerender\": [\n        {\n          \"source\": \"document\",\n          \"where\": {\n            \"and\": [\n              { \"href_matches\": \"\/*\" }\n            ]\n          },\n          \"eagerness\": \"moderate\"\n        }\n      ]\n    }\n    <\/script>\n    <link rel=\"preconnect\" href=\"https:\/\/fonts.googleapis.com\">\n    <link rel=\"preconnect\" href=\"https:\/\/fonts.gstatic.com\" crossorigin>\n    <link rel=\"dns-prefetch\" href=\"https:\/\/fonts.googleapis.com\">\n    <link rel=\"dns-prefetch\" href=\"https:\/\/fonts.gstatic.com\">\n    <?php\n    if (is_front_page() || is_home()) {\n        echo '<link rel=\"preload\" as=\"image\" href=\"https:\/\/escuelanauticalamardemalaga.com\/wp-content\/uploads\/2023\/10\/curso-licencia-navegacion-titulin-malaga-portada.webp\" fetchpriority=\"high\">';\n    }\n}, 1);\n\n\/\/ 2. INSTANT CLICK PREFETCHER & MENU DROPDOWN OPTIMIZER\nadd_action('wp_footer', function() {\n    if (is_admin()) return;\n    ?>\n    <style>\n        .fusion-main-menu .sub-menu {\n            transition: opacity 0.12s ease-in-out, visibility 0.12s ease-in-out !important;\n        }\n        .fusion-mobile-menu-icons a, .fusion-mobile-nav-holder a, .fusion-main-menu .fusion-menu-item-button {\n            touch-action: manipulation !important;\n            cursor: pointer !important;\n        }\n        .fusion-mobile-nav-holder {\n            transition: opacity 0.15s ease-in-out, height 0.15s ease-in-out !important;\n        }\n    <\/style>\n    <script>\n    (function() {\n        const prefetched = new Set();\n        function prefetchUrl(url) {\n            if (!url || prefetched.has(url) || !url.startsWith(window.location.origin) || url.includes('#') || url.includes('wp-admin')) return;\n            prefetched.add(url);\n            const link = document.createElement('link');\n            link.rel = 'prefetch';\n            link.href = url;\n            link.as = 'document';\n            document.head.appendChild(link);\n        }\n\n        document.addEventListener('mouseover', function(e) {\n            const a = e.target.closest('a');\n            if (a && a.href) prefetchUrl(a.href);\n        }, { passive: true });\n\n        document.addEventListener('touchstart', function(e) {\n            const a = e.target.closest('a');\n            if (a && a.href) prefetchUrl(a.href);\n        }, { passive: true });\n    })();\n    <\/script>\n    <?php\n}, 999);\n\n\/\/ 3. DEQUEUE UNNECESSARY HEAVY SCRIPTS ON NON-CHECKOUT PAGES\nadd_action('wp_enqueue_scripts', function() {\n    if (is_admin()) return;\n    $is_payment = false;\n    if (function_exists('is_checkout') && is_checkout()) $is_payment = true;\n    if (function_exists('is_cart') && is_cart()) $is_payment = true;\n    \n    if (!$is_payment) {\n        wp_dequeue_script('stripe');\n        wp_dequeue_script('pms-stripe-script');\n        wp_dequeue_script('wc-stripe-payment-request');\n    }\n    \n    \/\/ Disable emoji scripts\n    remove_action('wp_head', 'print_emoji_detection_script', 7);\n    remove_action('wp_print_styles', 'print_emoji_styles');\n}, 999);\n\n\/\/ 4. SMART STUDENT MEMBERSHIP ROUTER\nadd_action('template_redirect', function() {\n    if (is_admin()) return;\n    if (is_page(array('acceso-tests-per', 'tests-navegacion-per-y-pnb', 5285, 2105))) {\n        if (class_exists('SwpmAuth')) {\n            $auth = SwpmAuth::get_instance();\n            if ($auth->is_logged_in()) {\n                $user_level = intval($auth->get('membership_level'));\n                $py_levels = array(5, 12, 15);\n                $cy_levels = array(6);\n                if (in_array($user_level, $py_levels, true)) {\n                    wp_redirect(home_url('\/tests-navegacion-patron-de-yate\/'));\n                    exit;\n                } elseif (in_array($user_level, $cy_levels, true)) {\n                    wp_redirect(home_url('\/tests-de-navegacion-de-capitan-de-yate\/'));\n                    exit;\n                }\n            }\n        }\n    }\n});\n","posts":[{"id":"6","title":"Inicio","slug":"inicio","type":"page","content_sample":"[fusion_builder_container type=\"flex\" hundred_percent=\"no\" hundred_percent_height=\"no\" hundred_percent_height_scroll=\"no\" align_content=\"stretch\" flex_align_items=\"flex-start\" flex_justify_content=\"flex-start\" flex_wrap=\"wrap\" hundred_percent_height_center_content=\"yes\" equal_height_columns=\"no\" container_tag=\"div\" hide_on_mobile=\"small-visibility,medium-visibility,large-visibility\" status=\"published\" border_style=\"solid\" box_shadow=\"no\" box_shadow_blur=\"0\" box_shadow_spread=\"0\" gradient_start_position=\"0\" gradient_end_position=\"100\" gradient_type=\"linear\" radial_direction=\"center center\" linear_angle=\"180\" background_position=\"center center\" background_repeat=\"no-repeat\" fade=\"no\" background_parallax=\"none\" enable_mobile=\"no\" parallax_speed=\"0.3\" background_blend_mode=\"none\" video_aspect_ratio=\"16:9\" video_loop=\"yes\" video_mute=\"yes\" pattern_bg=\"none\" pattern_bg_style=\"default\" pattern_bg_opacity=\"100\" pattern_bg_blend_mode=\"normal\" mask_bg=\"none\" mask_bg_style=\"default\" mask_bg_opaci"}]}