Files
roi-theme/wp-content/plugins/ajax-search-pro/backend/Classes/Options/ImageRadio.php
root a22573bf0b Commit inicial - WordPress Análisis de Precios Unitarios
- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 21:04:30 -06:00

30 lines
833 B
PHP
Executable File

<?php
namespace WPDRMS\Backend\Options;
/**
* Alternatives for both wpdreamsImageRadio, wd_imageRadio options
*/
class ImageRadio extends AbstractOption {
public function render() {
?>
<div class='wd_imageRadio'>
<label class='image_radio'><?php echo $this->label; ?></label>
<?php
foreach ($this->args['images'] as $k => $image) {
$image = trim($image);
$value = is_string($k) ? $k : $image;
$selected = !(strpos($value, $this->value) === false);
echo "
<img data-value = '".$value."' src='" . plugins_url() . $image . "'
class='image_radio" . (($selected) ? ' selected' : '') . "'/>";
}
?>
<input isparam="1" type="hidden"
class='realvalue'
value="<?php echo self::outputValue($this->value); ?>"
name="<?php echo $this->name; ?>">
</div>
<?php
}
}