"effectBlock", 'order' => 55); class effectBlock extends block { protected $blockname = "effect"; protected $fields = array( 'effect_type' => array('default' => 'none'), 'scale' => array('default' => '120'), ); public function parseCSS($css,$args) { $blockdata = $this->data[$this->blockname]; //$is_active = isset($blockdata['use_effect']) && $blockdata['use_effect'] == 1 ? true : false; //if (! $is_active) // return $css; $effect = $this->getValue('effect_type'); $style = $this->collection->getStyle(); // maybe this should be moved to style object in time(?) switch($effect) { case 'transform': $scale = $this->getvalue('scale'); $scale = $scale / 10; $css = $style->addEffect($css, $effect, array('scale' => $scale)); break; case 'drop': case 'shift': case 'lift' : $layoutBlock = $this->collection->getBlock('layoutBlock'); $labelsize = $layoutBlock->getValue('font_label_size'); $css = $style->addEffect($css, $effect, array('line_height' => $labelsize)); break; default: $css = $style->addEffect($css, $effect); break; } $css['mb-social']['normal']['transition'] = 'all 0.4s linear'; return $css; } public function admin() { $admin = mbSocial()->admin(); $types = array('none' => __('None', 'mbsocial'), 'hover' => __('Hover', 'mbsocial'), 'transform' => __('Enlarge', 'mbsocial'), 'drop' => __('Drop', 'mbsocial'), 'lift' => __('Lift from down', 'mbsocial'), 'shift' => __('Shift from left', 'mbsocial'), 'flip' => __('Flip', 'mbsocial'), 'stretch' => __('Stretch', 'mbsocial'), ); $shape_icons = array(); ?>