# ablocks/2.9.1/includes/blocks/coupon/attributes.php

aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder &amp; Animation Builder, version 2.9.1. 88 lines.

- Page: https://pluginprobe.com/plugins/ablocks/2.9.1/code/includes/blocks/coupon/attributes.php
- Raw: https://pluginprobe.com/plugins/ablocks/2.9.1/raw/includes/blocks/coupon/attributes.php
- Modified: 2025-04-22T12:59:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ablocks/2.9.1/code/includes/blocks/coupon/attributes.php#L10-L20`.

```php
<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

use ABlocks\Controls\Alignment;
use ABlocks\Controls\Icon;
use ABlocks\Controls\Range;
use ABlocks\Controls\Typography;
use ABlocks\Controls\TextShadow;
use ABlocks\Controls\Dimensions;
use ABlocks\Controls\Border;

$attributes = [
	'block_id' => [
		'type' => 'string',
		'default' => ''
	],
	'couponStyle' => [
		'type' => 'string',
		'default' => 'default'
	],
	'couponCode' => [
		'type' => 'string',
		'default' => 'KODEZEN50'
	],
	'couponBtnText' => [
		'type' => 'string',
		'default' => 'Copy Code'
	],
	'couponBtnAfterCopyText' => [
		'type' => 'string',
		'default' => 'Copied!'
	],

	'couponCodeColor' => [
		'type' => 'string',
		'default' => '#000000',
	],
	'couponCodeBgColor' => [
		'type' => 'string',
		'default' => '#ffffff',
	],
	'couponBtnTextColor' => [
		'type' => 'string',
		'default' => '#ffffff',
	],
	'couponBtnBgColor' => [
		'type' => 'string',
		'default' => '#000000',
	],

	'isShowIcon' => [
		'type' => 'boolean',
		'default' => true,
	],
];


$attributes = array_merge(
	Range::get_attribute( [
		'attributeName' => 'iconSize',
		'isResponsive' => true,
		'attributeObjectKey' => 'value',
		'defaultValue' => 20,
	]),
	Range::get_attribute( [
		'attributeName' => 'iconRotate',
		'isResponsive' => false,
		'defaultValue' => 0,
	]),
	Icon::get_attribute( 'icon', [ 'size' => '20' ] ),
	Alignment::get_attribute( 'position', true, [ 'value' => 'left' ] ),
	Typography::get_attribute( 'couponTypography', true ),
	TextShadow::get_attribute( 'couponTextShadow' ),
	Typography::get_attribute( 'buttonTypography', true ),
	TextShadow::get_attribute( 'buttonTextShadow' ),
	Dimensions::get_attribute( 'couponPadding', true ),
	Dimensions::get_attribute( 'buttonPadding', true ),
	Border::get_attribute( 'couponBorder', true ),
	Border::get_attribute( 'buttonBorder', true ),
	$attributes
);

return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );


```
