Accessoires
Catégorie
Accessoires
M
Aucun produit disponible
Cette catégorie est en cours de réassort.
Voir toute la boutique. Du coup, la description du theme survivait. // v4.19.13 : ob_start sur template_redirect avec callback qui scanne et // dédupe la section
complète (théme + plugins + wp_head). // ═══════════════════════════════════════════════════════════════════════════ if (!function_exists('falcon_client_v4_19_13_head_dedup_loaded')) { function falcon_client_v4_19_13_head_dedup_loaded() { return true; } // Désactive le buffer wp_head de v4.19.12 (incomplet) if (!defined('FALCON_CLIENT_DEDUP_DISABLED')) { define('FALCON_CLIENT_DEDUP_DISABLED', true); } add_action('template_redirect', function() { // Skip admin, AJAX, REST, feeds, sitemaps, robots, et fichiers binaires if (is_admin() || wp_doing_ajax() || wp_doing_cron()) return; if (defined('REST_REQUEST') && REST_REQUEST) return; if (is_feed() || is_robots()) return; if (function_exists('is_404') && is_404()) { // Sur 404, wait for proxy SEO Prog template_redirect to handle } ob_start(function($html) { // Sécurité : ne touche que les pages HTML (pas les XML, images, etc.) if (!is_string($html) || $html === '') return $html; if (stripos($html, ']*>)(.*?)()#is', function($m) use ($corrections) { $head_open = $m[1]; $head_inner = $m[2]; $head_close = $m[3]; // ─── META DESCRIPTION ───────────────────────────────────── $desc_pattern = '#]*?name\s*=\s*["\']description["\'][^>]*>\s*#i'; if (!empty($corrections['meta_description'])) { $head_inner = preg_replace($desc_pattern, '', $head_inner); $new = '' . "\n"; $head_inner = $new . $head_inner; } elseif (preg_match_all($desc_pattern, $head_inner, $matches) && count($matches[0]) > 1) { $first = $matches[0][0]; $head_inner = preg_replace($desc_pattern, '', $head_inner); $head_inner = $first . "\n" . $head_inner; } // ─── CANONICAL ──────────────────────────────────────────── $canon_pattern = '#]*?rel\s*=\s*["\']canonical["\'][^>]*>\s*#i'; if (!empty($corrections['canonical'])) { $head_inner = preg_replace($canon_pattern, '', $head_inner); $new = '' . "\n"; $head_inner = $new . $head_inner; } elseif (preg_match_all($canon_pattern, $head_inner, $matches) && count($matches[0]) > 1) { $first = $matches[0][0]; $head_inner = preg_replace($canon_pattern, '', $head_inner); $head_inner = $first . "\n" . $head_inner; } // ─── OG:DESCRIPTION ─────────────────────────────────────── $og_pattern = '#]*?property\s*=\s*["\']og:description["\'][^>]*>\s*#i'; if (!empty($corrections['og_description'])) { $head_inner = preg_replace($og_pattern, '', $head_inner); $new = '' . "\n"; $head_inner = $new . $head_inner; } elseif (preg_match_all($og_pattern, $head_inner, $matches) && count($matches[0]) > 1) { $first = $matches[0][0]; $head_inner = preg_replace($og_pattern, '', $head_inner); $head_inner = $first . "\n" . $head_inner; } return $head_open . $head_inner . $head_close; }, $html, 1 // limit : ne traite que la première occurrence (1 par page) ); }); }, 0); // priorité très tôt }Cette catégorie est en cours de réassort.
Voir toute la boutique