HEX
Server: Apache
System: Linux webm006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/slyfwmm/foar/wp-content/plugins/admin-menu-editor/customizables/Settings/PlainTextSetting.php
<?php

namespace YahnisElsts\AdminMenuEditor\Customizable\Settings;

/**
 * Like StringSetting, except it always strips HTML tags, even if the current
 * user has the "unfiltered_html" capability.
 */
class PlainTextSetting extends StringSetting {
	public function validate($errors, $value, $stopOnFirstError = false) {
		$convertedValue = parent::validate($errors, $value);
		if ( is_wp_error($convertedValue) || ($convertedValue === null) ) {
			return $convertedValue;
		}
		return wp_kses($convertedValue, 'strip');
	}
}