-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't show timezone if it's an "all day" event
- Loading branch information
1 parent
229c14f
commit 0c383dd
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
mu-plugins/osi-events-manager-tweaks/osi-events-manager-tweaks.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* Plugin Name: OSI Events Manager Tweaks | ||
* Description: Customizations for the Events Manager plugin. | ||
* Version: 1.0.0 | ||
* Author: WordPress.com Special Projects | ||
* Author URI: https://wpspecialprojects.wordpress.com/ | ||
*/ | ||
|
||
add_filter('em_event_output_placeholder', 'osi_em_event_output_placeholder', 10, 5); | ||
function osi_em_event_output_placeholder( $replace, $EM_Event, $full_result, $target, $placeholder_atts ) { | ||
if ( '#_EVENTTIMEZONE' === $full_result ) { | ||
$event_times = $EM_Event->output('#_EVENTTIMES'); | ||
if ( 'All Day' === $event_times ) { | ||
$replace = ''; | ||
} | ||
} | ||
return $replace; | ||
} |