@shareef790 Yes, this is certainly possible!
[open_now]<img src="/url/to/open-image.jpg" alt="We’re Open!">[/open_now]
[closed_now]<img src="/url/to/closed-image.jpg" alt="Sorry, We’re Closed">[/closed_now]
Details of additional parameters (such as automatic switching between the two versions) are listed in the Shortcodes tab.
If you want me to make a special SVG image of the We’re Open! motif with a We’re Closed alternative, please drop me a message.
Thanks mate. Yes if you have a special SVG image we are open and closed that would be great thanks
@shareef790 At the moment, this doesn’t exist, but I can add something to a subsequent version of the plugin using a special HTML class.
In the meantime, I’ll share an SVG of the plugin’s motif using the contact details I have for you.
@shareef790 I have added the two versions of the We’re Open and We’re Closed motifs as SVG – please download using this WeTransfer link. The link will expire in 14 days.
@shareef790 I’ve improved the conditional text and replacement codes so you can now check for logic like “closed now, but open later” or “closed now and not open later”.
Is there a global php function that determine whether the store is open at run time that other plugins can access?
@realheman No there isn’t. I would be open to a suggestion about how you’d like this to work?
Perhaps a regular task (using CRON) that will switch an option (e.g. we_are_open_status) to 1 for open and 0 for closed? It would only be as effective as the regularity of the task.
Or a function (such as we_are_open_status) outside of the Class that will return TRUE or FALSE?
If you want to use it on the front-end there are shortcodes for this. You can perform a check with JavaScript/jQuery and use an Ajax request to load new data.
-
This reply was modified 5 years, 10 months ago by
Noah Hearle. Reason: Added function suggestion