Your IP : 18.223.97.46


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

block.json000064400000002246150062050600006527 0ustar00{
	"name": "srfm/number",
	"title": "Number",
	"description": "Displays a SureForm Number Field",
	"category": "sureforms",
	"keywords": [ "number", "input", "custom", "field" ],
	"textdomain": "sureforms",
	"supports": {
		"reusable": false,
		"html": false
	},
	"example": {
		"attributes": {
			"preview": true
		}
	},
	"attributes": {
		"preview": {
			"type": "boolean",
			"default": false
		},
		"block_id": {
			"type": "string"
		},
		"defaultValue": {
			"type": "string"
		},
		"minValue": {
			"type": "number"
		},
		"maxValue": {
			"type": "number"
		},
		"required": {
			"type": "boolean",
			"default": false
		},
		"errorMsg": {
			"type": "string",
			"default": ""
		},
		"placeholder": {
			"type": "string",
			"default": ""
		},
		"fieldWidth": {
			"type": "number",
			"default": 100
		},
		"label": {
			"type": "string",
			"default": "Number"
		},
		"help": {
			"type": "string",
			"default": ""
		},
		"formatType": {
			"type": "string",
			"default": "us-style"
		},
		"formId": {
			"type": "number",
			"default": ""
		},
		"isConditionalLogic": {
			"type": "boolean",
			"default": false
		},
		"slug": {
			"type": "string",
			"default": ""
		}
	}
}
block.php000064400000001202150062050600006334 0ustar00<?php
/**
 * PHP render form Number Block.
 *
 * @package SureForms.
 */

namespace SRFM\Inc\Blocks\Number;

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

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

/**
 * Address Block.
 */
class Block extends Base {
	/**
	 * Render the block
	 *
	 * @param array<mixed> $attributes Block attributes.
	 *
	 * @return string|bool
	 */
	public function render( $attributes ) {
		if ( ! empty( $attributes ) ) {
			$markup_class = new Number_Markup( $attributes );
			ob_start();
			// phpcs:ignore
			echo $markup_class->markup();
		}
		return ob_get_clean();
	}
}