multi language support
support for small devices
This commit is contained in:
		@@ -1,20 +1,16 @@
 | 
			
		||||
<?php
 | 
			
		||||
function check_for_integer($input) {
 | 
			
		||||
    if (!is_numeric($input)) {
 | 
			
		||||
        wp_die('Bitte nur Zahlen, Danke!');
 | 
			
		||||
    }
 | 
			
		||||
function check_for_integer(int $input) {
 | 
			
		||||
    return $input;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
function hours_to_seconds_converter($input) {
 | 
			
		||||
function hours_to_seconds_converter(int $input) {
 | 
			
		||||
    // Hier kannst du die Eingabe validieren, z.B. sicherstellen, dass es sich um eine gültige E-Mail-Adresse handelt.
 | 
			
		||||
    return minutes_to_seconds_converter($input) * 60;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function minutes_to_seconds_converter($input) {
 | 
			
		||||
function minutes_to_seconds_converter(int $input) {
 | 
			
		||||
 | 
			
		||||
    // Hier kannst du die Eingabe validieren, z.B. sicherstellen, dass es sich um eine gültige E-Mail-Adresse handelt.
 | 
			
		||||
    return check_for_integer($input) * 60;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -43,7 +39,7 @@ function kompass_settings_validators()
 | 
			
		||||
        'check_for_integer');
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function update_settings($postParams) {
 | 
			
		||||
function update_settings(array $postParams) {
 | 
			
		||||
    $settings = ['kompass_limit_login_lockout_duration',
 | 
			
		||||
        'kompass_limit_login_allowed_retries',
 | 
			
		||||
        'kompass_limit_login_allowed_lockouts',
 | 
			
		||||
@@ -55,10 +51,10 @@ function update_settings($postParams) {
 | 
			
		||||
        'kompass_limit_login_cookies'];
 | 
			
		||||
 | 
			
		||||
    foreach ($settings as $curSetting) {
 | 
			
		||||
		if (isset($postParams[$curSetting])) {
 | 
			
		||||
			update_option( $curSetting, $postParams[ $curSetting ] );
 | 
			
		||||
		} else {
 | 
			
		||||
			update_option( $curSetting, '');
 | 
			
		||||
		}
 | 
			
		||||
        if (isset($postParams[$curSetting])) {
 | 
			
		||||
            update_option($curSetting, $postParams[$curSetting]);
 | 
			
		||||
        } else {
 | 
			
		||||
            update_option($curSetting, '');
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user