Admin Widgets
-
This is a PHP coding question about interacting with the Simple Calendar plugin from another plugin.
I am attempting to use the simcal_get_calendar() function to load data out of a calendar and present it in a widget on the Admin Dashboard in WordPress. In this case it’s a bar chart with a bar for each of our chapters showing the percentage of organizations within each of those chapters who actually have scheduled events on the calendar, to remind chapter leaders to follow up with their members to get their meetings on the calendar if they haven’t yet. I have the same chart on a normal page and it works fine, but when putting it in the widget, it appears that the simcal_get_calendar() call is returning an empty calendar when called from an admin page.
Looking at the code, it looks like it is purposely not loading the calendar retrieval code when loaded from an admin page, which is understandable because it’s probably a bit of bloat, so why load it when you don’t need it 🙂 I figured maybe there’s some way to trick it into loading when my widget is invoked, but I haven’t figured out how yet, so I figured I’d ask.
Thanks!
The topic ‘Admin Widgets’ is closed to new replies.