PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.2
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.2
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/FrmEntryShortcodeFormatter.php +8 -17 6.26.16.2 View file →
@@ -9,9 +9,8 @@
9 9 class FrmEntryShortcodeFormatter {
10 10
11 11 /**
12 12 * @var int
13 - *
14 13 * @since 2.04
15 14 */
16 15 protected $form_id = 0;
17 16
@@ -16,9 +15,8 @@
16 15 protected $form_id = 0;
17 16
18 17 /**
19 18 * @var array
20 - *
21 19 * @since 2.04
22 20 */
23 21 protected $skip_fields = array( 'captcha', 'html' );
24 22
@@ -23,9 +21,8 @@
23 21 protected $skip_fields = array( 'captcha', 'html' );
24 22
25 23 /**
26 24 * @var array
27 - *
28 25 * @since 3.0
29 26 */
30 27 protected $single_cell_fields = array( 'html' );
31 28
@@ -30,9 +27,8 @@
30 27 protected $single_cell_fields = array( 'html' );
31 28
32 29 /**
33 30 * @var array
34 - *
35 31 * @since 2.04
36 32 */
37 33 protected $fields = array();
38 34
@@ -37,9 +33,8 @@
37 33 protected $fields = array();
38 34
39 35 /**
40 36 * @var bool
41 - *
42 37 * @since 2.05
43 38 */
44 39 protected $is_plain_text = false;
45 40
@@ -44,23 +39,20 @@
44 39 protected $is_plain_text = false;
45 40
46 41 /**
47 42 * @var string
48 - *
49 43 * @since 2.04
50 44 */
51 45 protected $format = 'text';
52 46
53 47 /**
54 - * @var FrmTableHTMLGenerator|null
55 - *
48 + * @var FrmTableHTMLGenerator
56 49 * @since 2.04
57 50 */
58 - protected $table_generator;
51 + protected $table_generator = null;
59 52
60 53 /**
61 54 * @var array
62 - *
63 55 * @since 2.04
64 56 */
65 57 protected $array_content = array();
66 58
@@ -67,9 +59,9 @@
67 59 /**
68 60 * FrmEntryShortcodeFormatter constructor
69 61 *
70 62 * @param int|string $form_id
71 - * @param array $atts
63 + * @param array $atts
72 64 */
73 65 public function __construct( $form_id, $atts ) {
74 66 if ( ! $form_id ) {
75 67 return;
@@ -94,8 +86,9 @@
94 86 * Initialize the form_id property
95 87 *
96 88 * @since 2.04
97 89 *
90 + * @param $form_id
98 91 * @param int|string $form_id
99 92 *
100 93 * @return void
101 94 */
@@ -160,10 +153,8 @@
160 153 /**
161 154 * Return the default HTML for an entry
162 155 *
163 156 * @since 2.04
164 - *
165 - * @return array|string
166 157 */
167 158 public function content() {
168 159 if ( ! $this->form_id || empty( $this->fields ) ) {
169 160 return '';
@@ -168,9 +159,9 @@
168 159 if ( ! $this->form_id || empty( $this->fields ) ) {
169 160 return '';
170 161 }
171 162
172 - if ( $this->format === 'array' ) {
163 + if ( $this->format == 'array' ) {
173 164 $content = $this->get_array();
174 165 } elseif ( $this->is_plain_text_format() ) {
175 166 $content = $this->get_plain_text();
176 167 } else {
@@ -213,9 +204,9 @@
213 204 *
214 205 * @return string
215 206 */
216 207 protected function get_table() {
217 - $content = $this->table_generator->generate_table_header();
208 + $content = $this->table_generator->generate_table_header();
218 209 $content .= $this->generate_content_for_all_fields();
219 210 $content .= $this->table_generator->generate_table_footer();
220 211
221 212 return $content;
@@ -262,9 +253,9 @@
262 253 *
263 254 * @since 2.04
264 255 *
265 256 * @param stdClass $field
266 - * @param mixed $value
257 + * @param mixed $value
267 258 *
268 259 * @return string
269 260 */
270 261 protected function generate_two_cell_shortcode_row( $field, $value = null ) {
@@ -313,9 +304,9 @@
313 304 *
314 305 * @since 2.04
315 306 *
316 307 * @param stdClass $field
317 - * @param string $value
308 + * @param string $value
318 309 *
319 310 * @return void
320 311 */
321 312 protected function add_single_field_array( $field, $value ) {