- 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>
30 lines
833 B
PHP
Executable File
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
|
|
}
|
|
}
|