array( 'type' => 'color-picker', 'order' => 12, 'title' => __('Default Color', 'wp-ultimo'), 'desc' => __('Set the default value for this color field.', 'wp-ultimo'), ), ); } // end get_fields; /** * Returns the field/element actual field array to be used on the checkout form. * * @since 2.0.0 * * @param array $attributes Attributes saved on the editor form. * @return array An array of fields, not the field itself. */ public function to_fields_array($attributes) { return array( $attributes['id'] => array( 'type' => 'color', 'id' => $attributes['id'], 'name' => $attributes['name'], 'placeholder' => $attributes['placeholder'], 'tooltip' => $attributes['tooltip'], 'default' => $attributes['default_value'], 'required' => $attributes['required'], 'wrapper_classes' => $attributes['element_classes'], 'classes' => 'wu-rounded', 'value' => $this->get_value(), 'html_attr' => array( 'style' => 'width: 50px !important', ), ), ); } // end to_fields_array; } // end class Signup_Field_Color;