Asynchronous Events
summary
WordPress hooks that fire on save_post, page load or comment creation can block the request; 10up’s open source PHP class (created for TechCrunch on WordPress VIP by Eric Mann and John Bloch) moves those actions to the shutdown phase so expensive calls run after response, e.g. Crunchbase lookups on every article are deferred, reducing hook overhead to a negligible amount in practice. Implementation extends the base class with prepared_data and run_action methods and registers wpa_sync_save_post to run on shutdown.
AI-written summary · about
