Make WordPress Core


Ignore:
Timestamp:
12/17/2018 07:27:08 PM (6 years ago)
Author:
desrosj
Message:

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.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-admin/includes/admin-filters.php

    r43486 r44275  
    6969add_filter( 'heartbeat_received', 'wp_check_locked_posts', 10, 3 );
    7070add_filter( 'heartbeat_received', 'wp_refresh_post_lock', 10, 3 );
     71add_filter( 'heartbeat_received', 'heartbeat_autosave', 500, 2 );
     72
    7173add_filter( 'wp_refresh_nonces', 'wp_refresh_post_nonces', 10, 3 );
    72 add_filter( 'heartbeat_received', 'heartbeat_autosave', 500, 2 );
     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.