Files
roi-theme/wp-content/plugins/ajax-search-pro/backend/settings/class/wd_image_radio.class.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

50 lines
1.6 KiB
PHP
Executable File

<?php
if (!class_exists("wd_imageRadio")) {
/**
* Class wpdreamsImageRadio
*
* Displays selectable images like radio buttons.
*
* @package WPDreams/OptionsFramework/Classes
* @category Class
* @author Ernest Marcinko <ernest.marcinko@wp-dreams.com>
* @link http://wp-dreams.com, http://codecanyon.net/user/anago/portfolio
* @copyright Copyright (c) 2016, Ernest Marcinko
*/
class wd_imageRadio extends wpdreamsType {
private $selects, $selected;
public function getType() {
parent::getType();
$this->processData();
echo "<div class='wd_imageRadio'>";
echo "<label class='image_radio'>" . $this->label . "</label>";
$i = 1;
foreach ($this->selects as $k => $image) {
$image = trim($image);
$selected = !(strpos($k, $this->selected) === false);
echo "
<img num='" . $i . "' sel = '".$k."' src='" . plugins_url() . $image . "' class='image_radio" . (($selected) ? ' selected' : '') . "'/>
";
$i++;
}
echo "<input isparam=1 type='hidden' class='realvalue' value='" . $this->selected . "' name='" . $this->name . "'>";
echo "<div class='triggerer'></div>
</div>";
}
function processData() {
$this->selects = $this->defaultData['images'];
$this->selected = $this->data['value'];
}
final function getData() {
return $this->data;
}
final function getSelected() {
return $this->selected;
}
}
}