Your IP : 13.59.51.100


Current Path : /home/ephorei/www/wp-includes/images/media/q2m9hb/
Upload File :
Current File : /home/ephorei/www/wp-includes/images/media/q2m9hb/inlinebutton.tar

block.json000064400000001427150062057340006537 0ustar00{
	"name": "srfm/inline-button",
	"title": "Custom Button",
	"description": "Displays a SureForms Custom Button",
	"category": "sureforms",
	"keywords": [
		"inline submit",
		"button",
		"submit",
		"inline",
		"custom",
		"custom button"
	],
	"textdomain": "sureforms",
	"supports": {
		"reusable": false,
		"html": false,
		"multiple": false
	},
	"example": {
		"attributes": {
			"preview": true
		}
	},
	"attributes": {
		"preview": {
			"type": "boolean",
			"default": false
		},
		"block_id": {
			"type": "string"
		},
		"fieldWidth": {
			"type": "number",
			"default": 100
		},
		"buttonText": {
			"type": "string",
			"default": "Submit"
		},
		"formId": {
			"type": "number",
			"default": ""
		},
		"isConditionalLogic": {
			"type": "boolean",
			"default": false
		}
	}
}
block.php000064400000001264150062057340006354 0ustar00<?php
/**
 * PHP render form Inline Button Block.
 *
 * @package SureForms.
 */

namespace SRFM\Inc\Blocks\Inlinebutton;

use SRFM\Inc\Blocks\Base;
use SRFM\Inc\Fields\Inlinebutton_Markup;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Inline Button Block.
 */
class Block extends Base {
	/**
	 * Render the block
	 *
	 * @param array<mixed> $attributes Block attributes.
	 *
	 * @return string|bool
	 * @since 0.0.2
	 */
	public function render( $attributes ) {

		if ( ! empty( $attributes ) ) {
			$markup_class = new Inlinebutton_Markup( $attributes );
			ob_start();
			// phpcs:ignore.
			echo $markup_class->markup();
		}
		return ob_get_clean();
	}
}