Example #1
0
 function attr()
 {
     $attr = array();
     $attr['class'] = 'fusion-reading-box-container reading-box-container-' . $this->tagline_box_counter;
     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'], 'offset' => self::$args['animation_offset']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
         unset($attr['animation_class']);
     }
     $attr['style'] = '';
     if (self::$args['margin_top'] || self::$args['margin_top'] === '0') {
         $attr['style'] .= sprintf('margin-top:%s;', Avada_Sanitize::get_value_with_unit(self::$args['margin_top']));
     }
     if (self::$args['margin_bottom'] || self::$args['margin_bottom'] === '0') {
         $attr['style'] .= sprintf('margin-bottom:%s;', Avada_Sanitize::get_value_with_unit(self::$args['margin_bottom']));
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     return $attr;
 }
Example #2
0
 function attr()
 {
     $attr = array();
     // FIXXXME had clearfix class; group mixin working?
     $attr['class'] = 'fusion-reading-box-container reading-box-container-' . $this->tagline_box_counter;
     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'];
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     return $attr;
 }
 function attr()
 {
     $attr['class'] = sprintf('fa fontawesome-icon %s circle-%s', FusionCore_Plugin::font_awesome_name_handler(self::$args['icon']), self::$args['circle']);
     $attr['style'] = '';
     if (self::$args['circle'] == 'yes') {
         if (self::$args['circlebordercolor']) {
             $attr['style'] .= sprintf('border-color:%s;', self::$args['circlebordercolor']);
         }
         if (self::$args['circlecolor']) {
             $attr['style'] .= sprintf('background-color:%s;', self::$args['circlecolor']);
         }
         $attr['style'] .= sprintf('font-size:%spx;', self::$args['circle_yes_font_size']);
         $attr['style'] .= sprintf('line-height:%spx;height:%spx;width:%spx;', self::$args['line_height'], self::$args['line_height'], self::$args['line_height']);
     } else {
         $attr['style'] .= sprintf('font-size:%spx;', self::$args['font_size']);
     }
     if ('center' == self::$args['alignment']) {
         $attr['style'] .= 'margin-left:0;margin-right:0;';
     } else {
         $attr['style'] .= sprintf('margin-%s:%spx;', self::$args['icon_margin_position'], self::$args['icon_margin']);
     }
     if (self::$args['iconcolor']) {
         $attr['style'] .= sprintf('color:%s;', self::$args['iconcolor']);
     }
     if (self::$args['rotate']) {
         $attr['class'] .= ' fa-rotate-' . self::$args['rotate'];
     }
     if (self::$args['spin'] == 'yes') {
         $attr['class'] .= ' fa-spin';
     }
     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']);
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     return $attr;
 }
Example #4
0
 function attr()
 {
     $attr['class'] = sprintf('fa fontawesome-icon %s size-%s %2$s circle-%s', FusionCore_Plugin::font_awesome_name_handler(self::$args['icon']), self::$args['size'], self::$args['circle']);
     $attr['style'] = '';
     if (self::$args['circle'] == 'yes') {
         if (self::$args['circlebordercolor']) {
             $attr['style'] .= sprintf('border-color:%s;', self::$args['circlebordercolor']);
         }
         if (self::$args['circlecolor']) {
             $attr['style'] .= sprintf('background-color:%s;', self::$args['circlecolor']);
         }
     }
     if (self::$args['iconcolor']) {
         $attr['style'] .= sprintf('color:%s;', self::$args['iconcolor']);
     }
     if (self::$args['flip']) {
         $attr['class'] .= ' fa-flip-' . self::$args['flip'];
     }
     if (self::$args['rotate']) {
         $attr['class'] .= ' fa-rotate-' . self::$args['rotate'];
     }
     if (self::$args['spin'] == 'yes') {
         $attr['class'] .= ' fa-spin';
     }
     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']);
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     return $attr;
 }
Example #5
0
 function attr()
 {
     $attr = array();
     $attr['class'] = sprintf('fusion-alert alert %s alert-dismissable alert-%s', self::$args['type'], $this->alert_class);
     if (self::$args['box_shadow'] == 'yes') {
         $attr['class'] .= ' alert-shadow';
     }
     if ($this->alert_class == 'custom') {
         $attr['style'] = sprintf('background-color:%s;color:%s;border-color:%s;border-width:%s;', self::$args['background_color'], self::$args['accent_color'], self::$args['accent_color'], self::$args['border_size']);
     }
     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'];
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     return $attr;
 }
 function attr()
 {
     $attr = array();
     $attr['class'] = sprintf('fusion-recent-works layout-%s', self::$args['layout']);
     if (self::$args['layout'] == 'carousel') {
         $attr['class'] .= ' recent-works-carousel';
         if (self::$args['picture_size'] == 'auto') {
             $attr['class'] .= ' picture-size-auto';
         }
     } else {
         $attr['class'] .= sprintf(' portfolio portfolio-%s', $this->column);
         $attr['data-columns'] = $this->column;
     }
     if (self::$args['layout'] == 'grid') {
         $attr['class'] .= ' portfolio-grid';
     }
     if (self::$args['layout'] == 'grid-with-excerpts') {
         $attr['class'] .= sprintf(' portfolio-%s-text', $this->column);
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     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'];
     }
     return $attr;
 }
 function child_wrapper_attr()
 {
     $attr['class'] = 'counter-circle-wrapper';
     $attr['style'] = sprintf('height:%spx;width:%spx;line-height:%spx;', self::$child_args['size'], self::$child_args['size'], self::$child_args['size']);
     $attr['data-originalsize'] = self::$child_args['size'];
     if (self::$parent_args['animation_offset']) {
         $animations = FusionCore_Plugin::animations(array('offset' => self::$parent_args['animation_offset']));
         $attr = array_merge($attr, $animations);
     }
     return $attr;
 }
 function attr()
 {
     $attr = array();
     // Add general classes
     $attr['class'] = sprintf('fusion-recent-works fusion-recent-works-%s fusion-recent-works-%s', $this->recent_works_counter, self::$args['layout']);
     // Add classes for carousel layout
     if (self::$args['layout'] == 'carousel') {
         $attr['class'] .= ' recent-works-carousel';
         if (self::$args['picture_size'] == 'auto') {
             $attr['class'] .= ' picture-size-auto';
         }
         // Add classes for grid layouts
     } else {
         $attr['class'] .= sprintf(' fusion-portfolio fusion-portfolio-%s fusion-portfolio-%s', $this->column, self::$args['boxed_text']);
         if (self::$args['layout'] == 'grid-with-excerpts') {
             $attr['class'] .= ' fusion-portfolio-text';
         }
         $attr['data-columns'] = $this->column;
     }
     // Add class for no spacing
     if (self::$args['column_spacing'] == '0' || self::$args['column_spacing'] == '0px') {
         $attr['class'] .= ' fusion-no-col-space';
     }
     // Add custom class
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     // Add custom id
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     // Add animation classes
     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;
 }
 function icon_attr()
 {
     $attr['style'] = '';
     if (self::$child_args['image']) {
         $attr['class'] = 'image';
         if (self::$parent_args['layout'] == 'icon-boxed' && self::$child_args['image_width'] && self::$child_args['image_height']) {
             $attr['style'] = sprintf('margin-left:-%spx;', self::$child_args['image_width'] / 2);
             $attr['style'] .= sprintf('top:-%spx;', self::$child_args['image_height'] / 2 + 50);
         }
     } else {
         if (self::$child_args['icon']) {
             $attr['class'] = sprintf('fa fontawesome-icon medium %s', FusionCore_Plugin::font_awesome_name_handler(self::$child_args['icon']));
             // set parent values if child values are unset to get downwards compatibility
             if (!self::$child_args['circle']) {
                 self::$child_args['circle'] = self::$parent_args['circle'];
             }
             if (!self::$child_args['circlebordercolor']) {
                 self::$child_args['circlebordercolor'] = self::$parent_args['circlebordercolor'];
             }
             if (!self::$child_args['circlecolor']) {
                 self::$child_args['circlecolor'] = self::$parent_args['circlecolor'];
             }
             if (!self::$child_args['iconcolor']) {
                 self::$child_args['iconcolor'] = self::$parent_args['iconcolor'];
             }
             // ! self::$child_args['circle'] for backwards compatibility
             if (self::$child_args['circle'] == 'yes' || !self::$child_args['circle']) {
                 $attr['class'] .= ' circle-yes';
                 if (self::$child_args['circlebordercolor']) {
                     $attr['style'] .= sprintf('border-color:%s;', self::$child_args['circlebordercolor']);
                 }
                 if (self::$child_args['circlecolor']) {
                     $attr['style'] .= sprintf('background-color:%s;', self::$child_args['circlecolor']);
                 }
             }
             if (self::$child_args['iconcolor']) {
                 $attr['style'] .= sprintf('color:%s;', self::$child_args['iconcolor']);
             }
             if (self::$child_args['iconflip']) {
                 $attr['class'] .= ' fa-flip-' . self::$child_args['iconflip'];
             }
             if (self::$child_args['iconrotate']) {
                 $attr['class'] .= ' fa-rotate-' . self::$child_args['iconrotate'];
             }
             if (self::$child_args['iconspin'] == 'yes') {
                 $attr['class'] .= ' fa-spin';
             }
         }
     }
     if (self::$child_args['animation_type']) {
         $animations = FusionCore_Plugin::animations(array('type' => self::$child_args['animation_type'], 'direction' => self::$child_args['animation_direction'], 'speed' => self::$child_args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     return $attr;
 }
Example #10
0
 function column_attr()
 {
     $attr = array();
     if (self::$args['columns']) {
         $columns = 12 / self::$args['columns'];
     } else {
         $columns = 3;
     }
     $attr['class'] = sprintf('fusion-column column col col-lg-%s col-md-%s col-sm-%s', $columns, $columns, $columns);
     if (self::$args['columns'] == '5') {
         $attr['class'] = 'fusion-column column col-lg-2 col-md-2 col-sm-2';
     }
     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'], 'offset' => self::$args['animation_offset']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
         unset($attr['animation_class']);
     }
     return $attr;
 }
Example #11
0
 function attr()
 {
     $attr['class'] = sprintf('button %3$s button %4$s fusion-button button-%s button-%s button-%s button-%s button-%s buttonshadow-%s', self::$args['type'], self::$args['shape'], self::$args['size'], self::$args['color'], $this->button_counter, self::$args['shadow']);
     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'];
     }
     $attr['type'] = 'button';
     $attr['target'] = self::$args['target'];
     $attr['title'] = self::$args['title'];
     $attr['href'] = self::$args['link'];
     if (self::$args['modal']) {
         $attr['data-toggle'] = 'modal';
         $attr['data-target'] = '.' . self::$args['modal'];
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     return $attr;
 }
 function content_wrapper_attr()
 {
     $attr['class'] = 'col content-wrapper';
     // set parent values if child values are unset to get downwards compatibility
     if (!self::$child_args['backgroundcolor']) {
         self::$child_args['backgroundcolor'] = self::$parent_args['backgroundcolor'];
     }
     if (self::$child_args['backgroundcolor']) {
         $attr['style'] = sprintf('background-color:%s;', self::$child_args['backgroundcolor']);
         if (self::$child_args['backgroundcolor'] != 'transparent') {
             $attr['class'] .= '-background';
         }
     }
     if (self::$parent_args['layout'] == 'icon-boxed') {
         $attr['class'] .= ' content-wrapper-boxed';
     }
     if (self::$child_args['link'] && self::$parent_args['link_area'] == 'box') {
         $attr['data-link'] = self::$child_args['link'];
     }
     $attr['class'] .= ' link-area-' . self::$parent_args['link_area'];
     if (self::$child_args['link'] && self::$parent_args['link_type']) {
         $attr['class'] .= ' link-type-' . self::$parent_args['link_type'];
     }
     if (self::$child_args['outercirclebordercolor'] && self::$child_args['outercirclebordersize']) {
         $attr['class'] .= ' content-icon-wrapper-yes';
     }
     if (self::$child_args['outercirclebordercolor'] && self::$child_args['outercirclebordersize'] && self::$parent_args['icon_hover_type'] == 'pulsate') {
         $attr['class'] .= ' icon-wrapper-hover-animation-' . self::$parent_args['icon_hover_type'];
     } else {
         $attr['class'] .= ' icon-hover-animation-' . self::$parent_args['icon_hover_type'];
     }
     if (self::$child_args['textcolor']) {
         $attr['style'] .= sprintf('color:%s;', self::$child_args['textcolor']);
     }
     if (self::$child_args['animation_type']) {
         $animations = FusionCore_Plugin::animations(array('type' => self::$child_args['animation_type'], 'direction' => self::$child_args['animation_direction'], 'speed' => self::$child_args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
         unset($attr['animation_class']);
     }
     return $attr;
 }
Example #13
0
 function content_wrapper_attr()
 {
     $attr['class'] = 'col content-wrapper';
     // set parent values if child values are unset to get downwards compatibility
     if (!self::$child_args['backgroundcolor']) {
         self::$child_args['backgroundcolor'] = self::$parent_args['backgroundcolor'];
     }
     if (self::$child_args['backgroundcolor']) {
         $attr['style'] = sprintf('background-color:%s;', self::$child_args['backgroundcolor']);
         $attr['class'] .= '-background';
     }
     if (self::$parent_args['layout'] == 'icon-boxed') {
         $attr['class'] .= ' content-wrapper-boxed';
     }
     if (self::$child_args['textcolor']) {
         $attr['style'] .= sprintf('color:%s;', self::$child_args['textcolor']);
     }
     if (self::$child_args['animation_type']) {
         $animations = FusionCore_Plugin::animations(array('type' => self::$child_args['animation_type'], 'direction' => self::$child_args['animation_direction'], 'speed' => self::$child_args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
         unset($attr['animation_class']);
     }
     return $attr;
 }
Example #14
0
 function attr()
 {
     $attr = array();
     $attr['style'] = '';
     $attr['class'] = sprintf('fusion-imageframe imageframe imageframe-%s imageframe-%s', self::$args['style'], $this->imageframe_counter);
     if (self::$args['style'] == 'bottomshadow') {
         $attr['class'] .= ' element-bottomshadow';
     }
     if (self::$args['align'] == 'left') {
         $attr['style'] .= 'margin-right:25px;float:left;';
     } elseif (self::$args['align'] == 'right') {
         $attr['style'] .= 'margin-left:25px;float:right;';
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     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;
 }
Example #15
0
 function wrapper_attr($args)
 {
     $attr = array();
     $attr['class'] = 'fusion-column-wrapper';
     $attr['style'] = '';
     // Set custom background styles
     if (!$args['link'] && (!$args['hover_type'] || $args['hover_type'] == 'none')) {
         if ($args['background_image']) {
             $attr['style'] .= sprintf('background:url(%s) %s %s %s;', $args['background_image'], $args['background_position'], $args['background_repeat'], $args['background_color']);
             if ($args['background_repeat'] == 'no-repeat') {
                 $attr['style'] .= '-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;';
             }
         } elseif ($args['background_color']) {
             $attr['style'] .= sprintf('background-color:%s;', $args['background_color']);
         }
     }
     if ($args['background_image']) {
         $attr['data-bg-url'] = $args['background_image'];
     }
     // Set custom border styles
     if ($args['border_color'] && $args['border_size'] && $args['border_style']) {
         if ($args['border_position'] != 'all') {
             $border_position = '-' . $args['border_position'];
         } else {
             $border_position = '';
         }
         $attr['style'] .= sprintf('border%s:%s %s %s;', $border_position, $args['border_size'], $args['border_style'], $args['border_color']);
     }
     // Set custom padding
     if ($args['padding']) {
         $attr['style'] .= sprintf('padding:%s;', Avada_Sanitize::get_value_with_unit($args['padding']));
     }
     // Animations
     if ($args['animation_type']) {
         $animations = FusionCore_Plugin::animations(array('type' => $args['animation_type'], 'direction' => $args['animation_direction'], 'speed' => $args['animation_speed'], 'offset' => $args['animation_offset']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
         unset($attr['animation_class']);
     }
     return $attr;
 }
Example #16
0
 function child_attr()
 {
     if (self::$parent_args['columns'] && !empty(self::$parent_args['columns'])) {
         $columns = 12 / self::$parent_args['columns'];
     } else {
         $columns = 1;
     }
     $attr['class'] = 'fusion-counter-box fusion-column col-counter-box counter-box-wrapper col-lg-' . $columns . ' col-md-' . $columns . ' col-sm-' . $columns;
     if (self::$parent_args['columns'] == '5') {
         $attr['class'] = 'fusion-counter-box fusion-column col-counter-box counter-box-wrapper col-lg-2 col-md-2 col-sm-2';
     }
     if (self::$child_args['class']) {
         $attr['class'] .= ' ' . self::$child_args['class'];
     }
     if (self::$child_args['id']) {
         $attr['id'] = self::$child_args['id'];
     }
     if (self::$parent_args['animation_offset']) {
         $animations = FusionCore_Plugin::animations(array('offset' => self::$parent_args['animation_offset']));
         $attr = array_merge($attr, $animations);
     }
     return $attr;
 }
 function slideshow_attr()
 {
     $attr = array();
     $attr['class'] = 'fusion-flexslider flexslider';
     if (self::$args['layout'] == 'thumbnails-on-side') {
         $attr['class'] .= ' floated-slideshow';
     }
     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'];
     }
     return $attr;
 }
Example #18
0
 function icon_attr()
 {
     $attr = array();
     if (self::$child_args['image']) {
         $attr['class'] = 'image';
     } else {
         if (self::$child_args['icon']) {
             $attr['class'] = sprintf('fa %s', FusionCore_Plugin::font_awesome_name_handler(self::$child_args['icon']));
         }
     }
     if (self::$child_args['icon_color']) {
         $attr['style'] = sprintf('color:%s;', self::$child_args['icon_color']);
     }
     if (self::$child_args['icon_flip']) {
         $attr['class'] .= ' fa-flip-' . self::$child_args['icon_flip'];
     }
     if (self::$child_args['icon_rotate']) {
         $attr['class'] .= ' fa-rotate-' . self::$child_args['icon_rotate'];
     }
     if (self::$child_args['icon_spin'] == 'yes') {
         $attr['class'] .= ' fa-spin';
     }
     if (self::$child_args['animation_type'] && self::$child_args['icon_spin'] != 'yes') {
         $animations = FusionCore_Plugin::animations(array('type' => self::$child_args['animation_type'], 'direction' => self::$child_args['animation_direction'], 'speed' => self::$child_args['animation_speed']));
         $attr = array_merge($attr, $animations);
         $attr['class'] .= ' ' . $attr['animation_class'];
     }
     return $attr;
 }
Example #19
0
 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;
 }
 function attr()
 {
     global $smof_data;
     $attr = array();
     $attr['style'] = '';
     $bordercolor = self::$args['bordercolor'];
     $stylecolor = self::$args['stylecolor'];
     $bordersize = self::$args['bordersize'];
     $borderradius = self::$args['borderradius'];
     $style = self::$args['style'];
     // Add the needed styles to the img tag
     if (!$bordercolor) {
         $bordercolor = $smof_data['imgframe_border_color'];
     }
     if (!$stylecolor) {
         $stylecolor = $smof_data['imgframe_style_color'];
     }
     $rgb = FusionCore_Plugin::hex2rgb($stylecolor);
     $img_styles = '';
     if ($bordersize != '0' && $bordersize != '0px') {
         $img_styles .= "border:{$bordersize} solid {$bordercolor};";
     }
     if ($borderradius != '0' && $borderradius != '0px') {
         $img_styles .= "-webkit-border-radius:{$borderradius};-moz-border-radius:{$borderradius};border-radius:{$borderradius};";
     }
     if ($style == 'glow') {
         $img_styles .= "-moz-box-shadow: 0 0 3px rgba({$rgb[0]},{$rgb[1]},{$rgb[2]},.3);-webkit-box-shadow: 0 0 3px rgba({$rgb[0]},{$rgb[1]},{$rgb[2]},.3);box-shadow: 0 0 3px rgba({$rgb[0]},{$rgb[1]},{$rgb[2]},.3);";
     }
     if ($style == 'dropshadow') {
         $img_styles .= "-moz-box-shadow: 2px 3px 7px rgba({$rgb[0]},{$rgb[1]},{$rgb[2]},.3);-webkit-box-shadow: 2px 3px 7px rgba({$rgb[0]},{$rgb[1]},{$rgb[2]},.3);box-shadow: 2px 3px 7px rgba({$rgb[0]},{$rgb[1]},{$rgb[2]},.3);";
     }
     if ($img_styles) {
         $attr['style'] .= $img_styles;
     }
     $attr['class'] = sprintf('fusion-imageframe imageframe-%s imageframe-%s', self::$args['style'], $this->imageframe_counter);
     if (self::$args['style'] == 'bottomshadow') {
         $attr['class'] .= ' element-bottomshadow';
     }
     if (self::$args['align'] == 'left') {
         $attr['style'] .= 'margin-right:25px;float:left;';
     } elseif (self::$args['align'] == 'right') {
         $attr['style'] .= 'margin-left:25px;float:right;';
     }
     if (self::$args['hover_type'] != 'liftup') {
         $attr['class'] .= ' hover-type-' . self::$args['hover_type'];
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     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']);
     }
     if (self::$args['hide_on_mobile'] == 'yes') {
         $attr['class'] .= ' fusion-hide-on-mobile';
     }
     return $attr;
 }