| @@ -190,9 +190,9 @@ | ||
| 190 | 190 | if ( ! empty( $this->style_settings['class'] ) ) { |
| 191 | 191 | $this->table_style .= ' class="' . esc_attr( $this->style_settings['class'] ) . '"'; |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | - if ( ! empty( $this->width ) ) { | |
| 194 | + if ( $this->width ) { | |
| 195 | 195 | $this->table_style .= ' width="' . esc_attr( $this->width ) . '"'; |
| 196 | 196 | } |
| 197 | 197 | } |
| 198 | 198 | |
| @@ -203,15 +203,17 @@ | ||
| 203 | 203 | * |
| 204 | 204 | * @return void |
| 205 | 205 | */ |
| 206 | 206 | private function init_td_style() { |
| 207 | - if ( $this->use_inline_style === true ) { | |
| 208 | - $td_style_attributes = 'text-align:' . ( $this->direction === 'rtl' ? 'right' : 'left' ) . ';'; | |
| 209 | - $td_style_attributes .= 'color:' . $this->style_settings['text_color'] . ';padding:' . $this->cell_padding . ';vertical-align:top;'; | |
| 210 | - $td_style_attributes .= 'border-top:' . $this->style_settings['border_width'] . ' solid ' . $this->style_settings['border_color'] . ';'; | |
| 207 | + if ( $this->use_inline_style !== true ) { | |
| 208 | + return; | |
| 209 | + } | |
| 211 | 210 | |
| 212 | - $this->td_style = ' style="' . esc_attr( $td_style_attributes ) . '"'; | |
| 213 | - } | |
| 211 | + $td_style_attributes = 'text-align:' . ( $this->direction === 'rtl' ? 'right' : 'left' ) . ';'; | |
| 212 | + $td_style_attributes .= 'color:' . $this->style_settings['text_color'] . ';padding:' . $this->cell_padding . ';vertical-align:top;'; | |
| 213 | + $td_style_attributes .= 'border-top:' . $this->style_settings['border_width'] . ' solid ' . $this->style_settings['border_color'] . ';'; | |
| 214 | + | |
| 215 | + $this->td_style = ' style="' . esc_attr( $td_style_attributes ) . '"'; | |
| 214 | 216 | } |
| 215 | 217 | |
| 216 | 218 | /** |
| 217 | 219 | * Removes border CSS from HTML. |
| @@ -260,9 +262,9 @@ | ||
| 260 | 262 | $color_markup = trim( $color_markup ); |
| 261 | 263 | |
| 262 | 264 | // Check if each character in string is valid hex digit |
| 263 | 265 | if ( FrmAppHelper::ctype_xdigit( $color_markup ) ) { |
| 264 | - $color_markup = '#' . $color_markup; | |
| 266 | + return '#' . $color_markup; | |
| 265 | 267 | } |
| 266 | 268 | |
| 267 | 269 | return $color_markup; |
| 268 | 270 | } |
| @@ -446,11 +448,7 @@ | ||
| 446 | 448 | if ( $this->is_child ) { |
| 447 | 449 | $class .= ' frm-child-row'; |
| 448 | 450 | } |
| 449 | 451 | |
| 450 | - if ( $class ) { | |
| 451 | - $class = ' class="' . trim( $class ) . '"'; | |
| 452 | - } | |
| 453 | - | |
| 454 | - return $class; | |
| 452 | + return $class ? ' class="' . trim( $class ) . '"' : $class; | |
| 455 | 453 | } |
| 456 | 454 | } |