WordPress/wp-includes/rest-api
John Blackbourn 00680f2e89 REST API: Pass the previous state of the post as a parameter to the wp_after_insert_post hook.
This enables, for example, the previous post status to be used by this hook without the need to first capture it on an earlier hook.

This also fixes the value of the `$fire_after_hooks` parameter in `get_default_post_to_edit()` so the `wp_after_insert_post` action correctly fires just once on the new post screen.

Props Collizo4sky, peterwilsoncc, hellofromTonya, TimothyBlynJacobs, SergeyBiryukov

Fixes #45114

Built from https://develop.svn.wordpress.org/trunk@49731


git-svn-id: http://core.svn.wordpress.org/trunk@49454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-12-01 20:47:06 +00:00
..
endpoints REST API: Pass the previous state of the post as a parameter to the wp_after_insert_post hook. 2020-12-01 20:47:06 +00:00
fields REST API: Prevent PHP warning when metadata schema is missing properties. 2020-10-25 20:30:08 +00:00
search REST API: Introduce search post format handler. 2020-10-12 19:54:05 +00:00
class-wp-rest-request.php REST API: Support a broader range of JSON media types. 2020-10-27 16:44:06 +00:00
class-wp-rest-response.php Docs: Corrections and improvements to inline docs relating to the REST API. 2020-11-16 11:04:12 +00:00
class-wp-rest-server.php Docs: Corrections and improvements to inline docs relating to the REST API. 2020-11-16 11:04:12 +00:00