File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/radio.class.php.tar
httpdocs/wp-content/plugins/so-widgets-bundle/widgets/contact/fields/radio.class.php 0000644 00000001453 15154714220 0033235 0 ustar 00 var/www/vhosts/uyarreklam.com.tr <?php
class SiteOrigin_Widget_ContactForm_Field_Radio extends SiteOrigin_Widget_ContactForm_Field_Base {
public function render_field( $options ) {
if ( ! empty( $options['field']['options'] ) ) {
?>
<ul>
<?php foreach ( $options['field']['options'] as $i => $option ) { ?>
<li>
<label>
<input
type="radio"
value="<?php echo esc_attr( $option['value'] ); ?>"
name="<?php echo esc_attr( $options['field_name'] ); ?>"
id="<?php echo esc_attr( $options['field_id'] ) . '-' . $i; ?>"
<?php echo checked( $option['value'], $options['value'], false ); ?>
<?php self::add_custom_attrs( 'radio', $options ); ?>
/>
<?php echo esc_html( $option['value'] ); ?>
</label>
</li>
<?php } ?>
</ul>
<?php
}
}
}
uyarreklam.com.tr/httpdocs/wp-content/plugins/so-widgets-bundle/base/inc/fields/radio.class.php 0000644 00000002157 15155062513 0031623 0 ustar 00 var/www/vhosts <?php
/**
* Class SiteOrigin_Widget_Field_Radio
*/
class SiteOrigin_Widget_Field_Radio extends SiteOrigin_Widget_Field_Base {
/**
* The list of options which may be selected.
*
* @var array
*/
protected $options;
protected function render_field( $value, $instance ) {
if ( ! isset( $this->options ) || empty( $this->options ) ) {
return;
}
$i = 0;
foreach ( $this->options as $k => $v ) {
?>
<label for="<?php echo esc_attr( $this->element_id . '-' . $i ); ?>">
<input
type="radio"
name="<?php echo esc_attr( $this->element_name ); ?>"
id="<?php echo esc_attr( $this->element_id . '-' . $i ); ?>"
class="siteorigin-widget-input"
value="<?php echo esc_attr( $k ); ?>"
<?php checked( $k, $value ); ?>
>
<?php echo esc_html( $v ); ?>
</label>
<?php
++$i;
}
}
protected function sanitize_field_input( $value, $instance ) {
$sanitized_value = $value;
$keys = array_keys( $this->options );
if ( ! in_array( $sanitized_value, $keys ) ) {
$sanitized_value = isset( $this->default ) ? $this->default : false;
}
return $sanitized_value;
}
}