function wrapper_attr() { $attr = array(); $attr['class'] = 'fusion-column-wrapper'; $attr['style'] = ''; if (self::$args['background_image']) { $attr['style'] .= sprintf('background:url(%s) %s %s %s;', self::$args['background_image'], self::$args['background_position'], self::$args['background_repeat'], self::$args['background_color']); if (self::$args['background_repeat'] == 'no-repeat') { $attr['style'] .= '-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;'; } } elseif (self::$args['background_color']) { $attr['style'] .= sprintf('background-color:%s;', self::$args['background_color']); } if (self::$args['border_color'] && self::$args['border_size'] && self::$args['border_style']) { if (FusionCore_Plugin::is_transparent_color(self::$args['border_color'])) { $attr['style'] .= sprintf('outline:%s %s %s;', self::$args['border_size'], self::$args['border_style'], self::$args['border_color']); $attr['style'] .= sprintf('outline-offset: -%s;', self::$args['border_size']); } else { $attr['style'] .= sprintf('border:%s %s %s;', self::$args['border_size'], self::$args['border_style'], self::$args['border_color']); } } if (self::$args['padding']) { $attr['style'] .= sprintf('padding:%s;', self::$args['padding']); } return $attr; }
function wrapper_attr() { $attr = array(); $attr['class'] = 'fusion-column-wrapper'; $attr['style'] = ''; // Set custom background styles if (self::$args['background_image']) { $attr['style'] .= sprintf('background:url(%s) %s %s %s;', self::$args['background_image'], self::$args['background_position'], self::$args['background_repeat'], self::$args['background_color']); if (self::$args['background_repeat'] == 'no-repeat') { $attr['style'] .= '-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;'; } $attr['data-bg-url'] = self::$args['background_image']; } elseif (self::$args['background_color']) { $attr['style'] .= sprintf('background-color:%s;', self::$args['background_color']); } // Set custom border styles if (self::$args['border_color'] && self::$args['border_size'] && self::$args['border_style']) { if (FusionCore_Plugin::is_transparent_color(self::$args['border_color'])) { $attr['style'] .= sprintf('outline:%s %s %s;', self::$args['border_size'], self::$args['border_style'], self::$args['border_color']); $attr['style'] .= sprintf('outline-offset: -%s;', self::$args['border_size']); } else { $attr['style'] .= sprintf('border:%s %s %s;', self::$args['border_size'], self::$args['border_style'], self::$args['border_color']); } } // Set custom padding if (self::$args['padding']) { $attr['style'] .= sprintf('padding:%s;', self::$args['padding']); } // Animations if (self::$args['animation_type']) { $animations = FusionCore_Plugin::animations(array('type' => self::$args['animation_type'], 'direction' => self::$args['animation_direction'], 'speed' => self::$args['animation_speed'])); $attr = array_merge($attr, $animations); $attr['class'] .= ' ' . $attr['animation_class']; unset($attr['animation_class']); } return $attr; }