Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * The function below adds a placeholder to describe a recurrence pattern, or outputs nothing if event isn't a recurrence.
- * For instructions on how to install this snippet, see here - http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/
- *
- * @param string $replace
- * @param EM_Event $EM_Event
- * @param string $result
- * @return string
- */
- function my_em_event_recurrences_placeholder($replace, $EM_Event, $result){
- if( $result == '#_EVENTRECURRENCEDATES' ){
- $replace = '';
- if( $EM_Event->is_recurrence() ){
- $replace = $EM_Event->get_recurrence_description();
- }
- }
- return $replace;
- }
- add_filter('em_event_output_placeholder','my_em_event_recurrences_placeholder',1,3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement