/** * Tweaks row attributes on edit * * @since 3.0.0 */ public function edit_form_fields($atts) { // Parse ID if (empty($atts['el_id']) && !empty($atts['id'])) { $atts['el_id'] = $atts['id']; unset($atts['id']); } // Parse $style into $typography_style if (empty($atts['typography_style']) && !empty($atts['typo_style'])) { if (in_array($atts['typo_style'], array_flip(wpex_typography_styles()))) { $atts['typography_style'] = $atts['typo_style']; unset($atts['typo_style']); } } // Remove old style param if (!empty($atts['style']) && ('bordered' == $atts['style'] || 'boxed' == $atts['style'])) { unset($atts['style']); } // Parse css if (empty($atts['css'])) { // Convert deprecated fields to css field $atts['css'] = vcex_parse_deprecated_row_css($atts); // Unset deprecated vars unset($atts['bg_image']); unset($atts['bg_color']); unset($atts['margin_top']); unset($atts['margin_bottom']); unset($atts['margin_right']); unset($atts['margin_left']); unset($atts['padding_top']); unset($atts['padding_bottom']); unset($atts['padding_right']); unset($atts['padding_left']); unset($atts['border_width']); unset($atts['border_style']); unset($atts['border_color']); } // Return $atts return $atts; }
} if (!empty($typo_style) && empty($typography_style)) { $css_classes[] = wpex_typography_style_class($typo_style); } elseif (empty($typo_style) && !empty($typography_style)) { $css_classes[] = wpex_typography_style_class($typography_style); } /**** TOTAL INLINE CSS ***/ // Generate inline CSS $inline_style = ''; // Min Height if ($min_height) { $inline_style .= 'min-height:' . $min_height . ';'; } // Inline css styles => Fallback For OLD Total Params if (empty($css) && function_exists('vcex_parse_deprecated_row_css')) { $inline_style .= vcex_parse_deprecated_row_css($atts, 'inline_css'); } // Add inline style to wrapper attributes if ($inline_style) { $inline_style = ' style="' . $inline_style . '"'; } /*** TOTAL INLINCE CSS END ***/ // Get css class $css_class = preg_replace('/\\s+/', ' ', apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, implode(' ', array_filter($css_classes)), $this->settings['base'], $atts)); // Add classes to wrap attributes $wrapper_attributes[] = 'class="' . esc_attr(trim($css_class)) . '"'; $output .= '<div ' . implode(' ', $wrapper_attributes) . '>'; // CSS classname + min-height is added to wpb_wrapper to fix padding bug from VC/Bootsrap $output .= '<div class="wpb_wrapper wpex-vc-column-wrapper wpex-clr ' . vc_shortcode_custom_css_class($css) . '"' . $inline_style . '>'; $output .= wpb_js_remove_wpautop($content); $output .= '</div>' . $this->endBlockComment('.wpb_wrapper');
/** * Tweaks row attributes on edit * * @since 2.0.2 */ public function edit_form_fields($atts) { // Parse ID if (empty($atts['el_id']) && !empty($atts['id'])) { $atts['el_id'] = $atts['id']; unset($atts['id']); } // Parse $style into $typography_style if (empty($atts['typography_style']) && !empty($atts['style'])) { if (in_array($atts['style'], array_flip(wpex_typography_styles()))) { $atts['typography_style'] = $atts['style']; unset($atts['style']); } } // Parse parallax if (!empty($atts['parallax'])) { if (in_array($atts['parallax'], array('simple', 'advanced', 'true'))) { $atts['parallax'] = 'vcex_parallax'; } } elseif (empty($atts['parallax']) && !empty($atts['bg_style'])) { if ('parallax' == $atts['bg_style'] || 'parallax-advanced' == $atts['bg_style']) { $atts['parallax'] = 'vcex_parallax'; unset($atts['bg_style']); } } // Parse video background if (!empty($atts['video_bg']) && 'yes' == $atts['video_bg']) { $atts['video_bg'] = 'self_hosted'; } // Convert 'no-margins' to '0px' column_spacing if (empty($this->atts['column_spacing']) && !empty($atts['no_margins']) && 'true' == $atts['no_margins']) { $atts['column_spacing'] = '0px'; unset($atts['no_margins']); } // Parse css if (empty($atts['css'])) { // Convert deprecated fields to css field $atts['css'] = vcex_parse_deprecated_row_css($atts); // Unset deprecated vars unset($atts['bg_image']); unset($atts['bg_color']); unset($atts['margin_top']); unset($atts['margin_bottom']); unset($atts['margin_right']); unset($atts['margin_left']); unset($atts['padding_top']); unset($atts['padding_bottom']); unset($atts['padding_right']); unset($atts['padding_left']); unset($atts['border_width']); unset($atts['border_style']); unset($atts['border_color']); } // Return $atts return $atts; }