$attributes Block attributes. * @since 0.0.1 */ public function __construct( $attributes ) { $this->slug = 'number'; $this->min_value = isset( $attributes['minValue'] ) ? absint( Helper::get_string_value( $attributes['minValue'] ) ) : 1; $this->max_value = isset( $attributes['maxValue'] ) ? absint( Helper::get_string_value( $attributes['maxValue'] ) ) : 0; $this->step = isset( $attributes['step'] ) ? (float) Helper::get_string_value( $attributes['step'] ) : 1; $this->show_currency = ! empty( $attributes['showCurrency'] ); // Get currency symbol from settings. $this->currency_symbol = Helper::get_string_value( Helper::get_suredonation_option( 'currency_symbol', '$' ) ); $this->set_properties( $attributes ); $this->set_unique_slug(); $this->set_markup_properties(); } /** * Render number markup * * @since 0.0.1 * @return string */ public function markup() { $classes = $this->get_field_classes( $this->show_currency ? [ 'sd-has-currency' ] : [] ); $aria_desc = $this->get_aria_describedby(); ob_start(); ?>