Fix initial display
This commit is contained in:
@@ -121,10 +121,11 @@ class Roots_Vcard_Widget extends WP_Widget {
|
|||||||
|
|
||||||
function form($instance) {
|
function form($instance) {
|
||||||
foreach($this->fields as $name => $label) {
|
foreach($this->fields as $name => $label) {
|
||||||
|
${$name} = isset($instance[$name]) ? esc_attr($instance[$name]) : '';
|
||||||
?>
|
?>
|
||||||
<p>
|
<p>
|
||||||
<label for="<?php echo esc_attr($this->get_field_id($name)); ?>"><?php _e("{$label}:", 'roots'); ?></label>
|
<label for="<?php echo esc_attr($this->get_field_id($name)); ?>"><?php _e("{$label}:", 'roots'); ?></label>
|
||||||
<input class="widefat" id="<?php echo esc_attr($this->get_field_id($name)); ?>" name="<?php echo esc_attr($this->get_field_name($name)); ?>" type="text" value="<?php echo esc_attr(${$name}); ?>">
|
<input class="widefat" id="<?php echo esc_attr($this->get_field_id($name)); ?>" name="<?php echo esc_attr($this->get_field_name($name)); ?>" type="text" value="<?php echo ${$name}; ?>">
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user