'key', 'type' => 'text', 'label' => __('Parameter', 'zadex'), 'default' => '', 'placeholder' => 'utm_source'], ]; } public function render(array $settings, Context $ctx) { $key = isset($settings['key']) && is_string($settings['key']) ? trim($settings['key']) : ''; if ($key === '' || !isset($ctx->query[$key]) || !is_scalar($ctx->query[$key])) { return ''; } // Context::for_*() already unslashed and sanitized the query string; sanitize again for contexts built by hand. return sanitize_text_field((string) $ctx->query[$key]); } }