SIGN IN SIGN UP

Abilities API: Catch exceptions thrown by ability callbacks and return WP_Error.

Wraps `invoke_callback()` in a try/catch so that exceptions thrown by execute or permission callbacks are converted to a `WP_Error` with the `ability_callback_exception` code instead of propagating as uncaught throwables.

Developed in: https://github.com/WordPress/wordpress-develop/pull/11544

Props priyankagusani, jamesgiroux, jeffpaul, dkotter, adamsilverstein, justlevine, jorbin, pavanpatil1.
Fixes #65058.



git-svn-id: https://develop.svn.wordpress.org/trunk@62238 602fd350-edb4-49c9-b593-d223f7449a82
G
Greg Ziółkowski committed
42388b5720be7aaa3e79b653cc46c92a3d5c75b2
Parent: bf4c174