type-sharetwitter-text-before']);
}
else {
$twitter_share_text_before = "";
}
if(!empty($layer['settings']['link-type-sharetwitter-text-after'])){
$twitter_share_text_after = str_replace(array("%title%","%excerpt%"), array($title,$excerpt), $layer['settings']['link-type-sharetwitter-text-after']);
}
else {
$twitter_share_text_after = "";
}
$twitter_share_text = $twitter_share_text_before.$twitter_share_url.$twitter_share_text_after;
$text = ''.$text.'';
break;
case 'likepost':
if(!empty($this->post['ID']))
$text = ''.$text.''; //javascript-link
else $text = '';
break;
}
if($link_to !== 'none') $do_display = true; //set back to true if a link is set on layer
$text = trim($text);
//check for special styling coming from post option and set css to the queue
if(isset($layer['id'])) $this->set_meta_element_changes($layer['id'], $unique_class);
$post_class = (!isset($post['ID'])) ? '' : ' eg-post-'.$post['ID'];
if($base->text_has_certain_tag($text, 'a') && !$do_ignore_styles){ //check if a tag exists, if yes, class will be set to a tags and not the wrapping div, also the div will receive the position and other stylings // && @$layer['settings']['source'] !== 'text'
if($is_woo_cats && strpos($text, 'class="') !== false || $is_woo_button || $is_filter_cat && strpos($text, 'class="') !== false){ //add to the classes instead of creating own class attribute if it is woocommerce cats AND a class can be found
$text = str_replace('class="', 'class="'.$unique_class.$post_class.$lb_class.' ', $text);
}elseif($is_html_source && strpos($text, 'class="') !== false){
$text = str_replace('', '', $text);
//moved to more global css generation process @version: 2.0
//$this->add_css_wrap[$unique_class]['a']['display'] = $do_display; //do_display defines if we should write display: block;
//$this->add_css_wrap[$unique_class]['a']['full'] = $do_full; //do full styles (for categories and tags separator)
$unique_class .= '-a';
}
if($do_ignore_styles) $unique_class = 'eg-'.esc_attr($this->handle).'-nostyle-element-'.$layer['id'];
//replace all the normal shortcodes
if(function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')){ //use qTranslate
$text = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);
}elseif(function_exists('ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')){ //use qTranslate plus
$text = ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);
}elseif(function_exists('qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage')){ //use qTranslate X
$text = qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);
}
$text = do_shortcode($text);
if($special_item == 'true' && $special_item_type == 'line-break'){ //line break element
echo '