Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- {is_true} show this message {/is_true}
- */
- function my_em_has_attribute_event_output_condition($replacement, $condition, $match, $EM_Event){
- if( is_object($EM_Event) && preg_match('/^is_true/',$condition, $matches) ){
- if( !in_array($args['attribute_name'],$EM_Event->event_attributes) && !empty($EM_Event->event_attributes['attribute_name']) ){
- $replacement = preg_replace("/\{\/?$condition\}/", '', $match);
- }else{
- $replacement = '';
- }
- }
- return $replacement;
- }
- add_action('em_event_output_condition', 'my_em_has_attribute_event_output_condition', 1, 4);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement