PluginProbe
JetFormBuilder — Dynamic Blocks Form Builder / 3.6.6
JetFormBuilder — Dynamic Blocks Form Builder v3.6.6
3.6.6.1 3.6.6 3.6.5.4 3.6.5.3 3.6.5.2 3.6.5.1 3.6.5 3.6.4.2 3.6.4.1 3.6.4 3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 134 releases
← All changes | templates/common/field-column.php +33 -16 1.0.2 → 3.6.6 View file →
@@ -1,16 +1,33 @@
1 -<?php
2 -/**
3 - * Row-layout field template
4 - */
5 -
6 -echo $label;
7 -
8 -if ( $template ) {
9 - if ( is_readable( $template ) ) {
10 - include $template;
11 - } else {
12 - echo $template;
13 - }
14 -}
15 -
16 -echo $desc;
1 +<?php
2 +/**
3 + * Column-layout field template
4 + *
5 + * @var $template
6 + * @var $label
7 + * @var $desc
8 + * @var Base $this
9 + */
10 +
11 +use Jet_Form_Builder\Blocks\Render\Base;
12 +use Jet_Form_Builder\Classes\Tools;
13 +
14 +// If this file is called directly, abort.
15 +if ( ! defined( 'WPINC' ) ) {
16 + die;
17 +}
18 +
19 +//phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
20 +
21 +/*
22 + * We return the prepared field template.
23 + * Each of the listed variables is validated in separate files.
24 + *
25 + * $label - './field-label.php'
26 + * $desc - './field-description.php'
27 + * $template - '../fields/{$field_type}.php' ( takes place at the level of a separate field template )
28 + */
29 +echo Tools::esc_template_string( $label );
30 +echo Tools::esc_template_string( $template, false );
31 +echo Tools::esc_template_string( $desc );
32 +
33 +//phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped