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-admin/includes/admin-filters.php

    r43920 r43939  
    6969add_filter( 'heartbeat_received', 'wp_check_locked_posts',  10,  3 );
    7070add_filter( 'heartbeat_received', 'wp_refresh_post_lock',   10,  3 );
    71 add_filter( 'wp_refresh_nonces', 'wp_refresh_post_nonces', 10,  3 );
    7271add_filter( 'heartbeat_received', 'heartbeat_autosave',     500, 2 );
     72
     73add_filter( 'wp_refresh_nonces', 'wp_refresh_post_nonces', 10, 3 );
     74add_filter( 'wp_refresh_nonces', 'wp_refresh_heartbeat_nonces' );
    7375
    7476add_filter( 'heartbeat_settings', 'wp_heartbeat_set_suspension' );
Note: See TracChangeset for help on using the changeset viewer.