/home/techb158/public_html/wp-content/plugins/kirki/app
NameSizeModeActions
Casts/-0755rm
Constants/-0755rm
Contracts/-0755rm
DTO/-0755rm
FormActions/-0755rm
Http/-0755rm
Managers/-0755rm
Models/-0755rm
Providers/-0755rm
Resources/-0755rm
Services/-0755rm
Supports/-0755rm
Traits/-0755rm
Utils/-0755rm
Wordpress/-0755rm
helpers.php43630644editdlrm
Edit: /home/techb158/public_html/wp-content/plugins/kirki/app/helpers.php (4363B)
0; } } if (!function_exists('Kirki\App\get_editor_mode')) { /** * Get editor mode value * * @return string */ function get_editor_mode() { return 'kirki'; } } if (!function_exists('Kirki\App\soft_flush_rewrite_rules')) { /** * Soft flush rewrite rules * * @return void */ function soft_flush_rewrite_rules() { flush_rewrite_rules(false); } } if (!function_exists('Kirki\App\get_request_header')) { /** * Get request header by header name with sanitization * * @param string $header_name * * @return string|null */ function get_request_header(string $header_name) { if (function_exists('getallheaders')) { $headers = getallheaders(); return Sanitizer::apply_rule($headers[$header_name] ?? null, Sanitizer::TEXT); } // Fallback because `getallheaders()` is not guaranteed to exist in every PHP environment $normalized_name = strtolower(trim($header_name)); $content_headers = ['content-type', 'content-length', 'content-md5']; $header_key = in_array($normalized_name, $content_headers, true) ? str_replace('-', '_', strtoupper($normalized_name)) : 'HTTP_' . str_replace('-', '_', strtoupper($normalized_name)); $value = filter_input(INPUT_SERVER, $header_key, FILTER_UNSAFE_RAW); if (is_null($value) || $value === '' || $value === false) { return null; } return Sanitizer::apply_rule($value, Sanitizer::TEXT); } } if (!function_exists('Kirki\App\ensure_array')) { /** * Ensure that the value is an array. * * @param mixed $value * * @return array */ function ensure_array($value) { if (is_array($value)) { return $value; } if (is_string($value)) { $decoded = json_decode($value, true); return is_array($decoded) ? $decoded : $value; } return $value; } }