Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scripts: Assign api-fetch nonce with corrected rest_nonce.
As of `@wordpress/[email protected]` (introduced in 44812), the `apiFetch` nonce middleware must have its nonce value assigned explicitly, and will no longer listen for heartbeat ticks automatically. This changeset adds an inline script for the default registration of the `api-fetch` script handle to assign the nonce value in response to the heartbeat action. In doing so, it removes the now-unused, misnamed `rest-nonce` property from the heartbeat response, whose original introduction served as temporary compatibility with earlier versions of `@wordpress/api-fetch`. See WordPress/gutenberg#13451 See #45113 Props adamsilverstein, nerrad . Fixes #46107 . git-svn-id: http://develop.svn.wordpress.org/trunk@44949 602fd350-edb4-49c9-b593-d223f7449a82
- Loading branch information