HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/insiders/wp-load/wp-content/plugins/affiliatex/includes/blocks/ButtonBlock.php
<?php

namespace AffiliateX\Blocks;

use AffiliateX\Traits\ButtonRenderTrait;

defined( 'ABSPATH' ) || exit;

/**
 * AffiliateX Button Block
 *
 * @package AffiliateX
 */
class ButtonBlock extends BaseBlock
{
	use ButtonRenderTrait;

	protected function get_slug(): string
	{
		return 'buttons';
	}

	protected function get_fields(): array
	{
		return [
			'buttonLabel' => 'Button',
			'buttonSize' => 'medium',
			'buttonWidth' => 'flexible',
			'buttonURL' => '',
			'iconPosition' => 'left',
			'block_id' => '',
			'ButtonIcon' => [
				'name' => 'thumb-up-simple',
				'value' => 'far fa-thumbs-up'
			],
			'edButtonIcon' => false,
			'btnRelSponsored' => false,
			'openInNewTab' => false,
			'btnRelNoFollow' => false,
			'buttonAlignment' => 'flex-start',
			'btnDownload' => false,
			'layoutStyle' => 'layout-type-1',
			'priceTagPosition' => 'tagBtnright',
			'productPrice' => '$145'
		];
	}

	public function render(array $attributes, string $content) : string
	{
		$attributes = $this->parse_attributes($attributes);
		return $this->render_button($attributes);
	}
}