mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 19:54:28 +00:00
Block Editor: Refresh nonces used by wp.apiFetch.
Adds heartbeat nonces refreshing support to `wp.apiFetch` requests. Props pento, adamsilverstein, dd32, desrosj, youknowriad. Merges [43939] into trunk. Fixes #45113. git-svn-id: https://develop.svn.wordpress.org/trunk@44275 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -893,7 +893,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
|
||||
$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array( 'heartbeat' ), false, 1 );
|
||||
|
||||
$scripts->add( 'heartbeat', "/wp-includes/js/heartbeat$suffix.js", array( 'jquery' ), false, 1 );
|
||||
$scripts->add( 'heartbeat', "/wp-includes/js/heartbeat$suffix.js", array( 'jquery', 'wp-hooks' ), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize(
|
||||
'heartbeat',
|
||||
'heartbeatSettings',
|
||||
|
||||
Reference in New Issue
Block a user