mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 14:47:02 +00:00
Editor: Add Nonce Endpoint
This is a follow up to #47843, implementing a PHP endpoint and inline scripts after the editor package updates. The action was originally added in https://github.com/WordPress/gutenberg/pull/16683. Fixes #48076. git-svn-id: https://develop.svn.wordpress.org/trunk@46253 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -53,6 +53,7 @@ $core_actions_get = array(
|
||||
'autocomplete-user',
|
||||
'dashboard-widgets',
|
||||
'logged-in',
|
||||
'rest-nonce',
|
||||
);
|
||||
|
||||
$core_actions_post = array(
|
||||
|
||||
@@ -5268,3 +5268,12 @@ function wp_ajax_health_check_get_sizes() {
|
||||
|
||||
wp_send_json_success( $all_sizes );
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax handler to renew the REST API nonce.
|
||||
*
|
||||
* @since 5.3.0
|
||||
*/
|
||||
function wp_ajax_rest_nonce() {
|
||||
exit( wp_create_nonce( 'wp_rest' ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user