| LIMITED TIME OFFER! I’m ready for my next adventure as a DevRel advocate / Technical Evangelist / IT Talespinner. If that sounds like something you need, drop me a line by email or on LinkedIn. | |----|
\n If you’ve been following this blog, you know I’ve had a running series on implementing PHP Zmanim, the library based on Kosher Java that simplifies the work needed to calculate times related to Jewish religious observance. (If you need a full explanation of what that is, check out the first blog in the series.)
\ While the work of understanding and implementing PHP Zmanim has been fun for its own sake, I was working on a larger goal behind the scenes: A WordPress plugin that implemented the library in a way that non-programmers could use on their (WordPress-based) websites.
\ Today, I’m thrilled to announce the plugin is available for download. My wife is equally excited because it means I’ll (hopefully) go back to more consistently remembering to eat, bath, and come to bed.
\ Zmanim WP is free* and can be downloaded from within your WordPress environment (go to Plugins, Add a New Plugin, and search for “Zmanim WP” or even just “zmanim”).
\ Like the upcoming movie “The Thunderbolts*”, the splat (or “asterisk” for youngsters and pedantic linguists) is doing a bit of heavy lifting. Zmanim WP is actually “freemium”, meaning that some features are available and free to you forever, and other capabilities are only open if you buy a license.
\ Before you fire up the torches, grab anti-capitalist pitchforks, and head to my luxurious mansion in Cleveland with arson in your heart, note that all the proceeds are going to charity. The initial charity will be my synagogue because:
\
The Rabbi is my cousin and he’s an amazing guy…but more importantly,
\
They’ve been alpha testing this for over 2 years and had to suffer all my false starts, mistakes, bad time calculations, and questions. And did so with patience, equanimity, and good humor.
\ With all that said, I’d like to talk about how the plugin works overall, and then I’ll explain what’s in the free version versus what I’ve held back in exchange for some filthy lucre.
How Zmanim WP WorksIn its simplest form, the day-to-day use (I’ll get to the initial setup in a minute) of this plugin involves shortcodes, that might look like this:
[zman_sunset]or
[zman_shema]or
[zman_misheyakir]\ Basically, it’s a set of brackets ([...]) with the word “zman_” followed by a specific type of time. When a visitor comes to your live (WordPress-based) website and views a page, post, or widget with that shortcode, it will display the corresponding time.
\ For example, I have it running on THIS website, with the location set to Disneyland in California (Lat: 33.8120918, Long: -117.9215545). By using the shortcode [ zman_sunset ], you will see TODAY’S sunset for that location, no matter which day you view this page: 5:49 pm.
\ If you don’t include any other options, it will show the time for the current day, in a standard _hh:mm am/pm_ format.
\ But the fact is that you CAN include options – a lot of them. For example (and this is just a sample. For the full list of options you should check out the Zmanim WP documentation on AdatoSystems.com), you can include a date option.
\
“tomorrow” will show the day after the one when the page is viewed.
[ zman_alot date="tomorrow" ] (which, again, is set for “the happiest place on earth” would be 4:17 am)
\
“Sunday” (or Monday, Tuesday, etc.) will show the next upcoming day of that name. So, if it’s currently Monday, the following code will show the sunset for the upcoming Wednesday:
[ zman_sunset date="Wednesday" ] (which results in 5:51 pm)
\
(an actual date) will show the time for the specified date.
[ zman_alot date="2025-01-10" ] (that gives you 4:57 am)
\ You can also include a time offset. Let’s say that Mincha starts 20 minutes before sunset every day. You could automatically display that time using the code:[ zman_sunset offset=-20 ] (resulting in 5:29 pm)
\ You can also change the time formatting. This gets a little more into the weeds, as it leverages PHP’s built-in datetime formatting (Here’s a nice tutorial on how those formatting codes work.). Thus, if I wanted to get the date information along with the time (including seconds) for sunset, I could use this:[ zman_sunset dateformat="m-d-Y h:i:s a" ] (that would be: 03-02-2025 05:49:24 pm)
\ And just to be super clear about things, you can use all of those codes together if you want.
\ There are also some options that don’t work across the board. For example, “lang” will let you specify Hebrew or English for some output like the Torah Portion or the Date. But it wouldn’t work for sunset.
Fall Back: Setting Up Zmanim WPI said I would get to this part. To be honest, the setup isn’t all THAT involved. Once you install the plugin, you’ll get a new menu in the WordPress Admin portal. Clicking on the top-level menu takes you to the main options page:
\
\ Here, you set the location (using latitude and longitude), the time zone, and a few other cosmetic elements.
\ However, the main work of configuration happens on the Standard Zmanim Settings page.
This is where you select the method of calculating each zman from dropdowns populated with a wide range of halachic opinions.
Free FeaturesThe shortcodes that are available to all users are:
Location and ReferenceThe following shortcodes are only available in the paid version of the Zmanim WP plugin. Along with the shortcodes you see below, there are additional configuration screens to set up key options and elements of the codes.
Going all the way back to my first “Time Data Series” post:
“What time will afternoon prayers (Mincha) be this week?” is a deceptively complex question. It’s deceptive because “afternoon prayers” seems to be self-explanatory, but (as with so many things related to Jewish religious rules (halacha) there’s a vast amount of background, commentary, and specificity required.
\ If answering this question has stymied you, the Zmanim WP plugin might just be able to help. For more details, including how to download, install, and upgrade to the paid version of the plugin, check out the Zmanim WP documentation on AdatoSystems.com
All Rights Reserved. Copyright , Central Coast Communications, Inc.