| Server IP : 208.122.213.31 / Your IP : 216.73.216.45 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/self/cwd/wp-content/plugins/age-gate/src/Admin/Controller/ |
Upload File : |
<?php
namespace AgeGate\Admin\Controller;
use AgeGate\Common\Immutable\Constants as Immutable;
use AgeGate\Admin\Settings\Appearance;
use AgeGate\Common\Admin\AbstractController;
class AppearanceController extends AbstractController
{
use Appearance;
// const PERMISSION = Constants::RESTRICTIONS;
public const PERMISSION = Immutable::APPEARANCE;
public const OPTION = Immutable::OPTION_APPEARANCE;
public function register(): void
{
$this->menu(__('Appearance', 'age-gate'), self::PERMISSION);
}
protected function required(): bool
{
return current_user_can(self::PERMISSION);
}
protected function data(): array
{
return get_option(self::OPTION, []) ?: [];
}
protected function fields(): array
{
return $this->getAppearanceFields();
}
protected function rules() : array
{
return [
'logo' => 'numeric',
'background_color' => 'ag_hex',
'background_opacity' => 'float',
'blur' => 'numeric',
'background_image' => 'numeric',
'background_position.y' => 'alpha',
'background_position.x' => 'alpha',
'background_image_opacity' => 'float',
'foreground_color' => 'ag_hex',
'foreground_opacity' => 'float',
'text_color' => 'ag_hex',
'enqueue_css' => 'boolean',
'exit_transition' => 'alpha_dash',
'viewport' => 'boolean',
'input_auto_tab' => 'boolean',
'switch_title' => 'boolean',
'simplebar' => 'boolean',
// 'custom_title' => 'ag_message',
];
}
}