HEX
Server: Apache
System: Linux gains.linuxbigapps.com 4.18.0-553.74.1.lve.el8.x86_64 #1 SMP Tue Sep 9 14:25:24 UTC 2025 x86_64
User: mountains (1551)
PHP: 8.0.30
Disabled: allow_url_include, show_source, symlink, system, passthru, exec, popen, pclose, proc_open, proc_terminate,proc_get_status, proc_close, proc_nice, allow_url_fopen, shell-exec, shell_exec, fpassthru, base64_encodem, escapeshellcmd, escapeshellarg, crack_check,crack_closedict, crack_getlastmessage, crack_opendict, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, dl, escap, phpinfo
Upload Files
File: /home/mountains/public_html/wp-content/plugins/fluentform/app/Hooks/Frontend.php
<?php

/**
 * Declare frontend actions/filters/shortcodes
 */

//if ($app->getEnv() == 'dev') {
//	add_filter('init', function() use ($app) {
//		if ($header = $app->request->header('X-HOOK')) {
//			error_log($header);
//		}
//	});
//}


/*
 * Exclude For WP Rocket Settings
 */
if(defined('WP_ROCKET_VERSION')) {
    add_filter('rocket_excluded_inline_js_content', function ($lines) {
        $lines[] = 'fluent_form_ff_form_instance';
        $lines[] = 'fluentFormVars';
        $lines[] = 'fluentform_payment';
        return $lines;
    });
}
/*
 * Push captcha in all forms when enabled from global settings
 */
add_filter('fluentform_rendering_form', function ($form) {
    $option = get_option('_fluentform_global_form_settings');
    $enabled = \FluentForm\Framework\Helpers\ArrayHelper::get($option, 'misc.autoload_captcha');
    if (!$enabled) {
        return $form;
    }
    $type = \FluentForm\Framework\Helpers\ArrayHelper::get($option, 'misc.captcha_type');
    $reCaptcha = [
        "element"    => "recaptcha",
        "attributes" => [
            "name" => "recaptcha",
        ],
    ];
    $hCaptcha = [
        "element"    => "hcaptcha",
        "attributes" => [
            "name" => "hcaptcha",
        ],
    ];
    
    if ($type == 'recaptcha') {
        $captcha = $reCaptcha;
    } elseif ($type == 'hcaptcha') {
        $captcha = $hCaptcha;
    }
    
    // place recaptcha below custom submit button
    $hasCustomSubmit = false;
    foreach ($form->fields['fields'] as $index => $field) {
        if ($field['element'] == 'custom_submit_button') {
            $hasCustomSubmit = true;
            array_splice($form->fields['fields'], $index, 0, [$captcha]);
            break;
        }
    }
    if (!$hasCustomSubmit) {
        $form->fields['fields'][] = $captcha;
    }
    
    return $form;
}, 10, 1);