PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.4
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.4
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/FrmTableHTMLGenerator.php +4 -43 6.35.4 View file →
@@ -53,16 +53,8 @@
53 53 */
54 54 protected $td_style = '';
55 55
56 56 /**
57 - * Used to add a class in tables. Set in Pro.
58 - *
59 - * @var bool
60 - * @since 5.4.2
61 - */
62 - public $is_child = false;
63 -
64 - /**
65 57 * FrmTableHTMLGenerator constructor.
66 58 *
67 59 * @param string $type
68 60 * @param array $atts
@@ -82,9 +74,8 @@
82 74 *
83 75 * @since 2.04
84 76 *
85 77 * @param array $atts
86 - * @return void
87 78 */
88 79 private function init_style_settings( $atts ) {
89 80 $style_settings = array(
90 81 'border_color' => 'dddddd',
@@ -114,9 +105,8 @@
114 105 *
115 106 * @since 2.04
116 107 *
117 108 * @param array $atts
118 - * @return void
119 109 */
120 110 private function init_use_inline_style( $atts ) {
121 111 if ( isset( $atts['inline_style'] ) && ! $atts['inline_style'] ) {
122 112 $this->use_inline_style = false;
@@ -128,9 +118,8 @@
128 118 *
129 119 * @since 2.04
130 120 *
131 121 * @param array $atts
132 - * @return void
133 122 */
134 123 private function init_direction( $atts ) {
135 124 if ( isset( $atts['direction'] ) && $atts['direction'] === 'rtl' ) {
136 125 $this->direction = 'rtl';
@@ -140,9 +129,8 @@
140 129 /**
141 130 * Set the table_style property
142 131 *
143 132 * @since 2.04
144 - * @return void
145 133 */
146 134 private function init_table_style() {
147 135 if ( $this->use_inline_style === true ) {
148 136
@@ -159,9 +147,8 @@
159 147 /**
160 148 * Set the td_style property
161 149 *
162 150 * @since 2.04
163 - * @return void
164 151 */
165 152 private function init_td_style() {
166 153 if ( $this->use_inline_style === true ) {
167 154
@@ -242,10 +229,8 @@
242 229 * Switch the odd property from true to false or false to true
243 230 *
244 231 * @since 2.04
245 232 * @since 5.0.16 Changed scope from `private` to `protected`.
246 - *
247 - * @return void
248 233 */
249 234 protected function switch_odd() {
250 235 if ( $this->type !== 'shortcode' ) {
251 236 $this->odd = ! $this->odd;
@@ -285,9 +270,11 @@
285 270 * @return string
286 271 */
287 272 public function generate_two_cell_table_row( $label, $value ) {
288 273 $row = '<tr' . $this->tr_style();
289 - $row .= $this->add_row_class( $value === '' );
274 + if ( $value === '' ) {
275 + $row .= ' class="frm-empty-row"';
276 + }
290 277 $row .= '>';
291 278
292 279 $label = '<th' . $this->td_style . '>' . wp_kses_post( $label ) . '</th>';
293 280 $value = '<td' . $this->td_style . '>' . wp_kses_post( $value ) . '</td>';
@@ -316,11 +303,9 @@
316 303 *
317 304 * @return string
318 305 */
319 306 public function generate_single_cell_table_row( $value ) {
320 - $row = '<tr' . $this->tr_style();
321 - $row .= $this->add_row_class();
322 - $row .= '>';
307 + $row = '<tr' . $this->tr_style() . '>';
323 308 $row .= '<td colspan="2"' . $this->td_style . '>' . $value . '</td>';
324 309 $row .= '</tr>' . "\r\n";
325 310
326 311 $this->switch_odd();
@@ -325,30 +310,6 @@
325 310
326 311 $this->switch_odd();
327 312
328 313 return $row;
329 - }
330 -
331 - /**
332 - * Add classes to the tr.
333 - *
334 - * @since 5.4.2
335 - *
336 - * @param bool $empty If the value in the row is blank.
337 - *
338 - * @return string
339 - */
340 - protected function add_row_class( $empty = false ) {
341 - $class = '';
342 - if ( $empty ) {
343 - // Only add this class on two cell rows.
344 - $class .= ' frm-empty-row';
345 - }
346 - if ( $this->is_child ) {
347 - $class .= ' frm-child-row';
348 - }
349 - if ( $class ) {
350 - $class = ' class="' . trim( $class ) . '"';
351 - }
352 - return $class;
353 314 }
354 315 }