{"id":21585,"date":"2025-06-18T13:32:38","date_gmt":"2025-06-18T17:32:38","guid":{"rendered":"https:\/\/new2.mylpan.cl\/?post_type=wpcode&#038;p=21585"},"modified":"2026-02-09T14:05:59","modified_gmt":"2026-02-09T17:05:59","slug":"traduccion-hello-2","status":"publish","type":"post","link":"https:\/\/mylpan.cl\/?p=21585","title":{"rendered":"Traduccion Hello"},"content":{"rendered":"<p>add_action(&#8216;wp_footer&#8217;, function() {<br \/>\n    ?><br \/>\n    <script>\n      (function() {\n        function cambiarHello(elemento) {\n          if (elemento && elemento.textContent.trim() === 'Hello') {\n            elemento.textContent = 'Hola';\n            return true;\n          }\n          return false;\n        }<\/p>\n<p>        \/\/ Intentar al cargar por si ya est\u00e1\n        const objetivo = document.querySelector('.account-content .content-text');\n        if (cambiarHello(objetivo)) return;<\/p>\n<p>        \/\/ Crear un observer que vigile cambios en .account-content\n        const contenedor = document.querySelector('.account-content');\n        if (!contenedor) return;<\/p>\n<p>        const observer = new MutationObserver((mutations) => {\n          mutations.forEach(mutation => {\n            mutation.addedNodes.forEach(node => {\n              if (node.nodeType === 1) { \/\/ Elemento\n                const span = node.matches('.content-text') ? node : node.querySelector('.content-text');\n                if (span) cambiarHello(span);\n              }\n            });\n          });\n        });<\/p>\n<p>        observer.observe(contenedor, { childList: true, subtree: true });\n      })();\n    <\/script><br \/>\n    <?php\n});\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>add_action(&#8216;wp_footer&#8217;, function() { ?><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-21585","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/mylpan.cl\/index.php?rest_route=\/wp\/v2\/posts\/21585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mylpan.cl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mylpan.cl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mylpan.cl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mylpan.cl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=21585"}],"version-history":[{"count":0,"href":"https:\/\/mylpan.cl\/index.php?rest_route=\/wp\/v2\/posts\/21585\/revisions"}],"wp:attachment":[{"href":"https:\/\/mylpan.cl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21585"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mylpan.cl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21585"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mylpan.cl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}