Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * {has_location_town} #_LOCATIONTOWN {/has_location_town}
- */
- add_action('em_location_output_condition', 'my_em_has_location_output_condition', 1, 4);
- function my_em_has_location_output_condition($replacement, $condition, $match, $EM_Location){
- if( is_object($EM_Event) && preg_match('/^has_location_town/',$condition, $matches) ){
- if( !empty($EM_Location->location_town) ){
- $replacement = preg_replace("/\{\/?$condition\}/", '', $match);
- }else{
- $replacement = '';
- }
- }
- return $replacement;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement