PluginProbe
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz / 0.0.13
SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz v0.0.13
2.12.7 2.12.6 2.12.5 2.12.4 2.12.3 2.12.2 2.12.1 2.12.0 2.11.1 2.11.0 2.10.1 2.10.0 2.9.1 2.9.0 2.8.2 2.8.1 2.7.0 2.7.1 2.8.0 trunk 0.0.10 0.0.11 0.0.12 0.0.13 0.0.2 All 97 releases
sureforms / inc / fields / address-markup.php

address-markup.php in SureForms – Contact Form Builder, AI Forms, Payment Form, Survey & Quiz 0.0.13, at inc/fields/address-markup.php

64 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Sureforms Address Markup Class file.
4 *
5 * @package sureforms.
6 * @since 0.0.1
7 */
8
9 namespace SRFM\Inc\Fields;
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit; // Exit if accessed directly.
13 }
14
15 /**
16 * Sureforms Address Markup Class.
17 *
18 * @since 0.0.1
19 */
20 class Address_Markup extends Base {
21
22 /**
23 * Initialize the properties based on block attributes.
24 *
25 * @param array<mixed> $attributes Block attributes.
26 * @since 0.0.2
27 */
28 public function __construct( $attributes ) {
29 $this->set_properties( $attributes );
30 $this->set_input_label( __( 'Address', 'sureforms' ) );
31 $this->slug = 'address';
32 $this->set_markup_properties();
33 }
34
35 /**
36 * Render the sureforms address classic styling
37 *
38 * @param string $content inner block content.
39 * @since 0.0.2
40 * @return string|boolean
41 */
42 public function markup( $content = '' ) {
43 ob_start(); ?>
44 <div data-block-id="<?php echo esc_attr( $this->block_id ); ?>" class="srfm-block-single srfm-block srfm-<?php echo esc_attr( $this->slug ); ?>-block srf-<?php echo esc_attr( $this->slug ); ?>-<?php echo esc_attr( $this->block_id ); ?>-block<?php echo esc_attr( $this->block_width ); ?><?php echo esc_attr( $this->class_name ); ?> <?php echo esc_attr( $this->conditional_class ); ?>">
45 <fieldset>
46 <legend>
47 <?php echo wp_kses_post( $this->label_markup ); ?>
48 <?php echo wp_kses_post( $this->help_markup ); ?>
49 </legend>
50 <div class="srfm-block-wrap">
51 <?php
52 // phpcs:ignore
53 echo $content;
54 // phpcs:ignoreEnd
55 ?>
56 </div>
57 </fieldset>
58 </div>
59 <?php
60
61 return ob_get_clean();
62 }
63 }
64