/**
  * Render the shortcode
  * 
  * @param  array $args	 Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string		  HTML output
  */
 function render($args, $content = '')
 {
     global $smof_data;
     $defaults = shortcode_atts(array('class' => '', 'id' => '', 'background_color' => '', 'background_image' => '', 'background_position' => 'left top', 'background_repeat' => 'no-repeat', 'border_color' => '', 'border_position' => 'all', 'border_size' => '', 'border_style' => 'solid', 'center_content' => 'no', 'hide_on_mobile' => 'no', 'last' => 'no', 'margin_top' => $smof_data['col_top_margin'], 'margin_bottom' => $smof_data['col_bottom_margin'], 'padding' => '', 'spacing' => 'yes', 'animation_type' => '', 'animation_direction' => 'left', 'animation_speed' => '0.1'), $args);
     extract($defaults);
     if ($defaults['margin_top'] == '') {
         $defaults['margin_top'] = $smof_data['col_top_margin'];
     }
     if ($defaults['margin_bottom'] == '') {
         $defaults['margin_bottom'] = $smof_data['col_bottom_margin'];
     }
     self::$args = $defaults;
     // After the last column we need a clearing div
     $clearfix = '';
     if (self::$args['last'] == 'yes') {
         $clearfix = sprintf('<div %s></div>', FusionCore_Plugin::attributes('fusion-clearfix'));
     }
     $inner_content = do_shortcode($content);
     $inner_content .= '<div class="fusion-clearfix"></div>';
     // If content should be centered, add needed markup
     if ($center_content == 'yes') {
         $inner_content = sprintf('<div class="fusion-column-table"><div class="fusion-column-tablecell">%s</div></div>', $inner_content);
     }
     // Setup the main markup
     $html = sprintf('<div %s><div %s>%s</div></div>%s', FusionCore_Plugin::attributes('two-third-shortcode'), FusionCore_Plugin::attributes('two-third-shortcode-wrapper'), $inner_content, $clearfix);
     return $html;
 }
Пример #2
0
 /**
  * Render the shortcode
  * 
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = shortcode_atts(array('class' => '', 'id' => '', 'last' => 'no'), $args);
     extract($defaults);
     self::$args = $defaults;
     $clearfix = '';
     if (self::$args['last'] == 'yes') {
         $clearfix = sprintf('<div %s></div>', FusionCore_Plugin::attributes('fusion-clearfix'));
     }
     $html = sprintf('<div %s>%s</div>%s', FusionCore_Plugin::attributes('two-third-shortcode'), do_shortcode($content), $clearfix);
     return $html;
 }
Пример #3
0
 /**
  * Render the shortcode
  * 
  * @param  array $args	 Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string		  HTML output
  */
 function render($args, $content = '')
 {
     $defaults = shortcode_atts(array('class' => '', 'id' => '', 'background_color' => '', 'background_image' => '', 'background_position' => 'left top', 'background_repeat' => 'no-repeat', 'border_color' => '', 'border_size' => '', 'border_style' => 'solid', 'last' => 'no', 'padding' => '', 'spacing' => 'yes'), $args);
     extract($defaults);
     self::$args = $defaults;
     $clearfix = '';
     if (self::$args['last'] == 'yes') {
         $clearfix = sprintf('<div %s></div>', FusionCore_Plugin::attributes('fusion-clearfix'));
     }
     $html = sprintf('<div %s><div %s>%s</div></div>%s', FusionCore_Plugin::attributes('two-third-shortcode'), FusionCore_Plugin::attributes('two-third-shortcode-wrapper'), do_shortcode($content), $clearfix);
     return $html;
 }