field = $value['type']; $this->name = $value['name']; $this->id = $value['id']; $this->default = isset( $value['default'] ) ? $value['default'] : ''; $this->value = isset( $value['value'] ) ? $value['value'] : ''; $this->description = isset( $value['desc'] ) ? $value['desc'] : ''; $this->readonly = isset( $value['readonly'] ) ? ' readonly' : ''; $this->value_type = isset( $value['value_type'] ) ? $value['value_type'] : 'text'; $this->placeholder = isset( $value['placeholder'] ) ? 'placeholder="' . esc_attr( $value['placeholder'] ) . '"' : ''; $this->dependency = isset( $value['dependency'] ) ? $value['dependency'] : ''; $this->pro = isset( $value['pro'] ) ? $value['pro'] : false; $this->pro_info = isset( $value['pro_info'] ) ? $value['pro_info'] : ''; $this->min = isset( $value['min'] ) ? intval( $value['min'] ) : 0; } /** * HTML output of the field * * @since 1.0.0 */ public function render() { $additional_params = ''; if ( 'number' === $this->value_type ) { $additional_params = ' min="' . $this->min . '" step="1"'; $this->value = $this->value ? $this->value : '0'; $this->value = $this->value > $this->min ? $this->value : $this->min; } $is_pro = $this->pro && socialsnap()->pro || ! $this->pro; $is_pro_class = $is_pro ? '' : ' ss-pro-feature'; ob_start(); ?>
dependency ); ?>>
name ); ?> description ) { ?> icons->get_svg( 'info' ); // phpcs:ignore ?> pro_info ); } ?>
placeholder; // phpcs:ignore ?> name="id ); ?>" id="id ); ?>" value="value ); ?>" readonly ); ?> />