Your IP : 3.135.64.200


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

block.json000064400000002114150062034550006527 0ustar00{
  "name": "srfm/url",
  "title": "URL",
  "description": "Displays a SureForm URL Field",
  "category": "sureforms",
  "keywords": [
    "url",
    "link",
    "website"
  ],
  "textdomain": "sureforms",
  "supports": {
    "reusable": false,
    "html": false
  },
  "example": {
    "attributes": {
      "preview": true
    }
  },
  "attributes": {
    "preview": {
      "type": "boolean",
      "default": false
    },
    "block_id": {
      "type": "string"
    },
    "defaultValue": {
      "type": "string"
    },
    "required": {
      "type": "boolean",
      "default": false
    },
    "placeholder": {
      "type": "string",
      "default": ""
    },
    "fieldWidth": {
      "type": "number",
      "default": 100
    },
    "label": {
      "type": "string",
      "default": "URL"
    },
    "help": {
      "type": "string",
      "default": ""
    },
    "errorMsg": {
      "type": "string",
      "default": ""
    },
    "formId": {
      "type": "number",
      "default": ""
    },
    "isConditionalLogic": {
      "type": "boolean",
      "default": false
    }
  }
}block.php000064400000001164150062034550006351 0ustar00<?php
/**
 * PHP render form URL Block.
 *
 * @package SureForms.
 */

namespace SRFM\Inc\Blocks\Url;

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

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

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