# ablocks/2.13.1/includes/controls/group-button.php

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

- Page: https://pluginprobe.com/plugins/ablocks/2.13.1/code/includes/controls/group-button.php
- Raw: https://pluginprobe.com/plugins/ablocks/2.13.1/raw/includes/controls/group-button.php
- Modified: 2026-09-08T12:29: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.13.1/code/includes/controls/group-button.php#L10-L20`.

```php
<?php
namespace ABlocks\Controls;

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

use ABlocks\Classes\ControlBaseAbstract;

class GroupButton extends ControlBaseAbstract {

	public static function get_attribute_default_value( $is_responsive = false, $default = [] ) {
		if ( ! is_array( $default ) ) {
			$default = [];
		}
		if ( $is_responsive ) {
			return array_merge( [
				'value' => 'default',
				'valueTablet' => '',
				'valueMobile' => '',
			], $default );
		}
		return $default['value'] ?? 'default';
	}

	public static function get_attribute( $attributeName, $isResponsive = false, $default = [] ) {
		if ( $isResponsive ) {
			return [
				$attributeName => [
					'type' => 'object',
					'default' => self::get_attribute_default_value( $isResponsive, $default ),
				],
			];
		}
		return [
			$attributeName => [
				'type' => 'string',
				'default' => self::get_attribute_default_value( $isResponsive, $default ),
			]
		];
	}

	public static function get_css( $attribute_value, $property = '', $device = '' ) {
		if ( ! is_array( $attribute_value ) ) {
			return [];
		}
		$value = array_merge(
			$device ? self::responsive_defaults() : self::get_attribute_default_value( false ),
			$attribute_value
		);

		$css = [];
		if ( '' !== $value[ 'value' . $device ] ) {
			$css[ $property ] = $value[ 'value' . $device ];
		}
		return $css;
	}
}

```
