Your IP : 3.145.176.168


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

block.json000064400000002361150062050620006527 0ustar00{
  "name": "srfm/phone",
  "title": "Phone Number",
  "description": "Displays a SureForm Phone Field",
  "category": "sureforms",
  "keywords": [
    "telephone",
    "phone",
    "mobile",
    "field"
  ],
  "textdomain": "sureforms",
  "supports": {
    "reusable": false,
    "html": false
  },
  "example": {
    "attributes": {
      "preview": true
    }
  },
  "attributes": {
    "preview": {
      "type": "boolean",
      "default": false
    },
    "block_id": {
      "type": "string"
    },
    "required": {
      "type": "boolean"
    },
    "fieldWidth": {
      "type": "number",
      "default": 100
    },
    "label": {
      "type": "string",
      "default": "Phone Number"
    },
    "placeholder": {
      "type": "string"
    },
    "help": {
      "type": "string",
      "default": ""
    },
    "isUnique": {
      "type": "boolean",
      "default": false
    },
    "duplicateMsg": {
      "type": "string",
      "default": ""
    },
    "errorMsg": {
      "type": "string",
      "default": ""
    },
    "formId": {
      "type": "number",
      "default": ""
    },
    "autoCountry": {
      "type": "boolean",
      "default": true
    },
    "isConditionalLogic": {
      "type": "boolean",
      "default": false
    }
  }
}block.php000064400000001174150062050620006346 0ustar00<?php
/**
 * PHP render form Phone Block.
 *
 * @package SureForms.
 */

namespace SRFM\Inc\Blocks\Phone;

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

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

/**
 * Phone 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 Phone_Markup( $attributes );
			ob_start();
			// phpcs:ignore
			echo $markup_class->markup();
		}
		return ob_get_clean();
	}
}