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/VersusLineBlock.php
<?php

namespace AffiliateX\Blocks;

defined( 'ABSPATH' ) || exit;

use AffiliateX\Helpers\AffiliateX_Helpers;

/**
 * AffiliateX Versus Line Block
 *
 * @package AffiliateX
 */
class VersusLineBlock extends BaseBlock
{
	protected function get_slug(): string
	{
		return 'versus-line';
	}

	protected function get_fields(): array
	{
		return [
			'block_id' => '',
			'versusTable' => [],
			'vsLabel' => '',
			'versusTitleTag' => 'p'
		];
	}

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

		$wrapper_attributes = get_block_wrapper_attributes(array(
			'id' => "affiliatex-versus-line-style-$block_id",
			'class' => "affx-versus-line-block-container",
		));

		$versusTitleTag = AffiliateX_Helpers::validate_tag($attributes['versusTitleTag'], 'p');

		ob_start();
		include $this->get_template_path();
		return ob_get_clean();
	}
}