Background tasks: AJAX and scheduled events
Free themeThe AJAX action and the scheduled event BuddyX registers.
Requires PHP 8.1+. Customers never need this page. It is for developers who want to know what the theme runs behind the scenes.
AJAX actions
The action is for logged-in users only. There is no public (nopriv) version.
| Action | Registered when | Who can call it | What it does |
|---|---|---|---|
buddyx_regenerate_fonts_folder |
Always | Users with edit_theme_options, with the buddyx_regenerate_fonts nonce sent as nonce |
Deletes the locally stored Google Fonts folder so it is downloaded again. Responds with an error of invalid_permissions, no_font_loader (no local font cache exists), or failed_to_flush. |
Scheduled event
| Event | Schedule | What it does |
|---|---|---|
buddyx_delete_fonts_folder |
Monthly | Removes the locally stored Google Fonts folder and clears the buddyx_font_url option, so stale font files do not pile up. The fonts are downloaded again the next time a page needs them. |
Local font hosting is the Load Google Fonts Locally setting under Performance, and the Flush Local Font Files button clears the folder on demand. See Performance.
To run the cleanup now:
wp cron event run buddyx_delete_fonts_folder