chore: complete M1.1 runtime QA and release packaging
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
/**
|
||||
* Shared sanitization helpers. All options/banners/QA go through these.
|
||||
*/
|
||||
|
||||
function xshop_sanitize_url(?string $value): string {
|
||||
$value = trim((string) $value);
|
||||
return $value === '' ? '' : esc_url_raw($value);
|
||||
}
|
||||
|
||||
function xshop_sanitize_banner_position(string $value): string {
|
||||
$allowed = ['home_hero','home_strip','shop_top','product_sidebar','footer_top'];
|
||||
return in_array($value, $allowed, true) ? $value : 'home_hero';
|
||||
}
|
||||
|
||||
function xshop_sanitize_checkbox($value): string {
|
||||
return $value ? '1' : '0';
|
||||
}
|
||||
Reference in New Issue
Block a user