HEX
Server: Apache
System: Linux vps-15179318.kohladvogados.com.br 5.14.0-611.49.2.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr 30 09:05:08 EDT 2026 x86_64
User: kohlsol (1004)
PHP: 8.3.32
Disabled: NONE
Upload Files
File: //var/tmp/add_js_menu.py
path = "/home/kohlsol/public_html/wp-content/themes/brooklyn-child/functions.php"
with open(path) as f:
    fn = f.read()

addition = """

/**
 * Efeito de entrada suave ao rolar a página (IntersectionObserver nativo,
 * sem biblioteca extra) — pedido de Daniel de "incluir efeitos que o
 * template oferece", aplicado com moderação em vez de tudo animado.
 */
function kohl_solucoes_child_reveal_script() {
	?>
	<script>
	document.addEventListener('DOMContentLoaded', function () {
		if (!('IntersectionObserver' in window)) {
			document.querySelectorAll('.kohl-reveal').forEach(function (el) {
				el.classList.add('kohl-revealed');
			});
			return;
		}
		var observer = new IntersectionObserver(function (entries) {
			entries.forEach(function (entry) {
				if (entry.isIntersecting) {
					entry.target.classList.add('kohl-revealed');
					observer.unobserve(entry.target);
				}
			});
		}, { threshold: 0.15, rootMargin: '0px 0px -60px 0px' });
		document.querySelectorAll('.kohl-reveal').forEach(function (el) {
			observer.observe(el);
		});
	});
	</script>
	<?php
}
add_action( 'wp_footer', 'kohl_solucoes_child_reveal_script' );
"""

assert "kohl_solucoes_child_reveal_script" not in fn
fn += addition
with open(path, "w") as f:
    f.write(fn)
print("functions.php: script de reveal adicionado")