$attributes Block attributes. * @since 0.0.1 */ public function __construct( $attributes ) { $this->slug = 'input'; $this->max_length = isset( $attributes['maxLength'] ) ? absint( Helper::get_string_value( $attributes['maxLength'] ) ) : 100; $this->input_mask = isset( $attributes['inputMask'] ) ? Helper::get_string_value( $attributes['inputMask'] ) : 'none'; $this->custom_input_mask = 'custom-mask' === $this->input_mask && isset( $attributes['customInputMask'] ) ? Helper::get_string_value( $attributes['customInputMask'] ) : ''; $this->set_properties( $attributes ); $this->set_unique_slug(); $this->set_markup_properties(); } /** * Render input markup * * @since 0.0.1 * @return string */ public function markup() { $classes = $this->get_field_classes(); $aria_desc = $this->get_aria_describedby(); ob_start(); ?>