Make WordPress Core


Ignore:
Timestamp:
09/23/2019 05:46:33 PM (4 years ago)
Author:
iseulde
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r46174 r46253  
    52695269    wp_send_json_success( $all_sizes );
    52705270}
     5271
     5272/**
     5273 * Ajax handler to renew the REST API nonce.
     5274 *
     5275 * @since 5.3.0
     5276 */
     5277function wp_ajax_rest_nonce() {
     5278    exit( wp_create_nonce( 'wp_rest' ) );
     5279}
Note: See TracChangeset for help on using the changeset viewer.