WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/22/2018 07:39:02 PM (13 months ago)
Author:
youknowriad
Message:

Block Editor: Refresh nonces used by wp.apiFetch.

Adds heartbeat nonces refreshing support to wp.apiFetch requests.

Props pento, adamsilverstein, dd32, desrosj.
Fixes #45113.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-includes/script-loader.php

    r43935 r43939  
    870870    $scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('heartbeat'), false, 1 );
    871871
    872     $scripts->add( 'heartbeat', "/wp-includes/js/heartbeat$suffix.js", array('jquery'), false, 1 );
     872    $scripts->add( 'heartbeat', "/wp-includes/js/heartbeat$suffix.js", array( 'jquery', 'wp-hooks' ), false, 1 );
    873873    did_action( 'init' ) && $scripts->localize( 'heartbeat', 'heartbeatSettings',
    874874        /**
Note: See TracChangeset for help on using the changeset viewer.