File "ValidUIOptionRule.php"
Full Path: /home/warrior1/public_html/languages/wp-content/plugins/file-manager/backend/app/Http/Rules/ValidUIOptionRule.php
File size: 464 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace BitApps\FM\Http\Rules;
use BitApps\WPValidator\Rule;
class ValidUIOptionRule extends Rule
{
public function validate($value)
{
foreach ($value as $option) {
if (! \in_array($option, ['toolbar','places','tree','path','stat'])) {
return false;
}
}
return true;
}
public function message()
{
return __('UI option must be valid', 'file-manager');
}
}