/** * DEFINE shortcode content * * @param type $atts * @param type $content */ public function element_shortcode_full($atts = null, $content = null) { extract(shortcode_atts($this->config['params'], $atts)); $content_class = !empty($image_file) ? 'carousel-caption' : 'carousel-content'; $img = !empty($image_file) ? "<img src='{$image_file}' style='{HEIGHT}'>" : ''; // remove image shortcode in content $content = IG_Pb_Helper_Shortcode::remove_ig_shortcodes($content, 'ig_image'); $inner_content = IG_Pb_Helper_Shortcode::remove_autop($content); IG_Pb_Helper_Functions::heading_icon($heading, $icon, true); if (empty($heading) && empty($inner_content)) { $html_content = ""; } else { $html_content = "<div class='{$content_class}'>"; $html_content .= !empty($heading) ? "<h4><i class='{$icon}'></i>{$heading}</h4>" : ''; $html_content .= !empty($inner_content) ? "<p>{$inner_content}</p>" : ''; $html_content .= "</div>"; } return "<div class='{active} item'>{$img}{$html_content}</div><!--seperate-->"; }
/** * Get post excerpt (can't use WP excerpt function, because post content contains IGPB shortcodes) * * @param type $post_content * * @return type */ static function post_excerpt($post_content) { $excerpt = IG_Pb_Helper_Shortcode::remove_ig_shortcodes($post_content); return strip_tags($excerpt); }