// Fix duplicate cf7signature_resized syntax error
function fix_cf7_signature_duplicate_script($buffer) {
    $buffer = str_replace('let cf7signature_resized', 'var cf7signature_resized', $buffer);
    $buffer = str_replace('const cf7signature_resized', 'var cf7signature_resized', $buffer);
    return $buffer;
}
function cf7_signature_buffer_start() {
    ob_start('fix_cf7_signature_duplicate_script');
}
function cf7_signature_buffer_end() {
    if (ob_get_length()) {
        ob_end_flush();
    }
}
add_action('template_redirect', 'cf7_signature_buffer_start', -1);
add_action('shutdown', 'cf7_signature_buffer_end', 0);

// Force reCAPTCHA API to load correctly without async blocking
function fix_recaptcha_script_loading($tag, $handle, $src) {
    if ('google-recaptcha' === $handle || strpos($src, 'recaptcha/api.js') !== false) {
        return str_replace('async defer', '', $tag);
    }
    return $tag;
}
add_filter('script_loader_tag', 'fix_recaptcha_script_loading', 10, 3);

/ Register Google reCAPTCHA script handle if not already present
function register_google_recaptcha_script() {
    if ( ! wp_script_is( 'google-recaptcha', 'registered' ) ) {
        wp_register_script( 'google-recaptcha', 'https://www.google.com/recaptcha/api.js?render=explicit', array(), null, true );
    }
}
add_action( 'wp_enqueue_scripts', 'register_google_recaptcha_script', 5 );

// Load Google reCAPTCHA globally to prevent reference errors
function global_enqueue_recaptcha() {
    if ( function_exists( 'wpcf7_enqueue_scripts' ) ) {
        wpcf7_enqueue_scripts();
    }
}
add_action( 'wp_enqueue_scripts', 'global_enqueue_recaptcha', 20 );<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//www.presicoengrg.com/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://www.presicoengrg.com/page-sitemap.xml</loc>
		<lastmod>2025-11-06T13:25:49+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.presicoengrg.com/project-sitemap.xml</loc>
		<lastmod>2021-03-15T16:01:17+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.presicoengrg.com/achievements-sitemap.xml</loc>
		<lastmod>2025-08-01T07:23:34+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.presicoengrg.com/our_services-sitemap.xml</loc>
		<lastmod>2020-01-22T05:01:58+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.presicoengrg.com/project_category-sitemap.xml</loc>
		<lastmod>2021-03-15T16:01:17+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.presicoengrg.com/achievements_category-sitemap.xml</loc>
		<lastmod>2025-08-01T07:23:34+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->