Thank you! This has helped!
I placed it in the file em-functions.php.
I ran into another problem. I do not know PHP, could you tell me how to change the website URL instead of text previewed Website?
The current code:
<a href="http://#_ATT{Website}" target="_blank">#_ATT{Website}</a>
Required:
<a href="http://#_ATT{Website}" target="_blank">Website</a>
When I give the required code, the text always “Website”, which is wrong.
Use, reference to Website, Facebook, Twitter etc…
actually, you can use <a href="#_ATT{Website}" target="_blank">#_ATT{WebsiteText}</a>; create a new attribute #_ATT{WebsiteText} or create a placeholder that will convert #_ATT{Website} to text
http://wp-events-plugin.com/tutorials/create-a-custom-placeholder-for-event-formatting/
Thanks for the link, but it is beyond my knowledge 🙁
to the file I put em-functions.php
function filterEventOutputCondition($replacement, $condition, $match, $EM_Event){
if (is_object($EM_Event)) {
switch ($condition) {
// replace LF with HTML line breaks
case 'nl2br':
$replacement = nl2br(preg_replace('/\{\/?nl2br\}/', '', $match));
break;
// #_LATT{Web}
case 'has_latt_web':
if (is_array($EM_Event->event_attributes) && !empty($EM_Event->event_attributes['Web']))
$replacement = preg_replace('/\{\/?has_latt_web\}/', '', $match);
else
$replacement = '';
break;
case 'has_latt_facebook':
if (is_array($EM_Event->event_attributes) && !empty($EM_Event->event_attributes['Facebook']))
$replacement = preg_replace('/\{\/?has_latt_facebook\}/', '', $match);
else
$replacement = '';
break;
case 'has_latt_twitter':
if (is_array($EM_Event->event_attributes) && !empty($EM_Event->event_attributes['Twitter']))
$replacement = preg_replace('/\{\/?has_latt_twitter\}/', '', $match);
else
$replacement = '';
break;
}
}
return $replacement;
}
add_filter('em_event_output_condition', 'filterEventOutputCondition', 10, 4);
I do not know how to create #_ATT{WebsiteText}, #_ATT{FacebookText}, #_ATT{TwitterText} text and assign it “Website”, “Facebook” and “Twitter”. So I have not got great knowledge. Can you please help?