| | |
| | | $optionsHtml .= sprintf( |
| | | '<option value="%s"%s>%s</option>', |
| | | esc_attr($optValue), |
| | | selected($value, $optValue), |
| | | selected($value, $optValue, false), |
| | | esc_html($optLabel) |
| | | ); |
| | | } |
| | |
| | | esc_attr($name), |
| | | $optValue, |
| | | esc_attr($optValue), |
| | | checked($value, $optValue), |
| | | checked($value, $optValue,false), |
| | | esc_attr($name), |
| | | $optValue, |
| | | esc_html($optLabel) |
| | |
| | | |
| | | foreach ($fields as $fieldName => $fieldConfig) { |
| | | $fieldValue = $values[$fieldName] ?? ''; |
| | | $fullName = "{$name}:{$fieldName}"; |
| | | $fullName = array_key_exists('wrap', $config) ? $fieldName : "{$name}:{$fieldName}"; |
| | | $output .= static::render($fullName, $fieldValue, $fieldConfig); |
| | | } |
| | | |
| | | $output .= sprintf('</%s>', esc_attr($wrapper)); |
| | | |
| | | unset($config['label']); |
| | | return static::fieldWrap($name, $output, $config); |
| | | } |
| | | |