HEX
Server: Apache/2.4.65 (Debian)
System: Linux web6 5.10.0-36-amd64 #1 SMP Debian 5.10.244-1 (2025-09-29) x86_64
User: innocamp (1028)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /home/gdtrain/public_html/wp-content/plugins/backup-wd/includes/buwd-form-hidden.php
<?php

class Buwd_Form_Hidden extends Buwd_Form_Element
{
    protected $validation_types = array();
    public $type = 'TYPE_HIDDEN';

    public function get_type()
    {
        return $this->type;
    }

    public function overload(array $data)
    {
        parent::overload($data);
        if (isset($data["type"])) {
            $this->set_type($data["type"]);
        }
    }

    public function set_type($type)
    {
        $this->type = $type;
    }

    public function render()
    {
        $options = array(
            "id"    => $this->get_id(),
            "name"  => $this->get_name(),
            "class" => $this->get_classes(),
            "value" => $this->get_value(),
            "type"  => $this->get_type()
        );

        $options += $this->get_attr();

        $input = new Buwd_Helper_Html("input", $options);

        return $input->render();
    }

    public function validate()
    {
        $this->_has_errors = false;
        $value = $this->get_value();
        foreach ($this->get_validators() as $type => $allowed) {
            if (in_array($type, $this->validation_types)) {
                $v_class = new Buwd_Form_Validate();
                $v_method_name = 'is_valid_' . $type;

                if ($value && !$v_class->$v_method_name($value)) {
                    $this->_has_errors = true;
                    $this->_errors = $v_class->get_errors();
                }
            }
        }

        return $this->_has_errors;
    }
}