Skip to content

Commit

Permalink
Merge pull request reduxframework#1729 from yerooleopard/patch-1
Browse files Browse the repository at this point in the history
Update field_color_rgba.php for empty value failures. Thanks @yerooleopard!
  • Loading branch information
dovy committed Oct 1, 2014
2 parents 4d17560 + 2874bd1 commit 61e5a70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ReduxCore/inc/fields/color_rgba/field_color_rgba.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function render() {

$this->value = wp_parse_args( $this->value, $defaults );

echo '<input data-id="' . $this->field['id'] . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[color]' . '" id="' . $this->field['id'] . '-color" class="redux-color_rgba redux-color_rgba-init ' . $this->field['class'] . '" type="text" value="' . $this->value['color'] . '" data-default-color="' . $this->field['default']['color'] . '" data-defaultvalue="' . $this->field['default']['color'] . '" data-opacity="' . $this->value['alpha'] . '" />';
echo '<input data-id="' . $this->field['id'] . '" name="' . $this->field['name'] . $this->field['name_suffix'] . '[color]' . '" id="' . $this->field['id'] . '-color" class="redux-color_rgba redux-color_rgba-init ' . $this->field['class'] . '" type="text" value="' . $this->value['color'] . '" data-default-color="' . ( isset( $this->field['default']['color'] ) ? $this->field['default']['color'] : "" ) . '" data-defaultvalue="' . ( isset( $this->field['default']['color'] ) ? $this->field['default']['color'] : "" ) . '" data-opacity="' . $this->value['alpha'] . '" />';
echo '<input data-id="' . $this->field['id'] . '-alpha" name="' . $this->field['name'] . $this->field['name_suffix'] . '[alpha]' . '" id="' . $this->field['id'] . '-alpha" type="hidden" value="' . $this->value['alpha'] . '" />';

if ( ! isset( $this->field['transparent'] ) || $this->field['transparent'] !== false ) {
Expand Down Expand Up @@ -142,4 +142,4 @@ public function enqueue() {
);
}
}
}
}

0 comments on commit 61e5a70

Please sign in to comment.