The next major release of My Calendar should go out next week, and any answer I gave on this question will be largely obsolete next week, since there are a number of new filters & some other related changes. So for now I’m going to focus on getting the release done, then get back to you next week.
Great, thanks. I’ll wait for the update!
Update is released. With this update, you should be able to filter the titles globally using the filter ‘mc_filter_shortcodes’, which filters all template data for every event.
I don’t believe that there are any front-end cases at this point that aren’t using this source for the data. (Back-end is different, since it needs to be showing what’s actually saved in the database.)
This is an example using it to create a custom tag; but it could also manipulate existing data, e.g., taking $e[‘title’] and modifying it prior to display.
Brilliant, thank you! I’ll update my plugin and modify my code to suit.
OK, what I was actually trying to do was remove the “no time” label if it was present on an event.
In other words, if it was an all day event, with the label “All day”, I didn’t want anything about this to appear in the date line.
e.g. Monthly Instalment Due, All day
vs: Monthly Instalment Due
while allowing events with times to have the time displayed
e.g. Board Meeting, 5:00pm
So I found that your new “mc_event_content” was the filter I needed to strip this out in all locations at once.
If there’s a more elegant way to prevent the “notime” label from being displayed at all, please let me know.
Thanks! I really appreciate your plugin and your recent updates.
Nikki
Well, the easiest way to do that is to set the default ‘All Day’ text to a whitespace character, so it won’t be displayed.
Thanks, Joe.
I tried that, but then I get something like:
“Monthly Instalment Due,”
for any event that’s all day, and I do want the comma there for my events that aren’t all day.
Where is the comma coming from? I’m not sure what the context of that is.
Sorry, that’s because my event title template is:
{title}, {time}
Try {title}{time before=", "}
Brilliant, thank you! That works perfectly.