wp_start_scraping_edited_file_errors

The timeline below displays how wordpress function wp_start_scraping_edited_file_errors has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.3

/**
 * Starts scraping edited file errors.
 *
 * @since 4.9.0
 */
function wp_start_scraping_edited_file_errors()
{
    if (!isset($_REQUEST['wp_scrape_key']) || !isset($_REQUEST['wp_scrape_nonce'])) {
        return;
    }
    $key = substr(sanitize_key(wp_unslash($_REQUEST['wp_scrape_key'])), 0, 32);
    $nonce = wp_unslash($_REQUEST['wp_scrape_nonce']);
    if (get_transient('scrape_key_' . $key) !== $nonce) {
        echo "###### wp_scraping_result_start:{$key} ######";
        echo wp_json_encode(array('code' => 'scrape_nonce_failure', 'message' => __('Scrape key check failed. Please try again.')));
        echo "###### wp_scraping_result_end:{$key} ######";
        die;
    }
    if (!defined('WP_SANDBOX_SCRAPING')) {
        define('WP_SANDBOX_SCRAPING', true);
    }
    register_shutdown_function('wp_finalize_scraping_edited_file_errors', $key);
}

WordPress Version: 5.8

/**
 * Start scraping edited file errors.
 *
 * @since 4.9.0
 */
function wp_start_scraping_edited_file_errors()
{
    if (!isset($_REQUEST['wp_scrape_key']) || !isset($_REQUEST['wp_scrape_nonce'])) {
        return;
    }
    $key = substr(sanitize_key(wp_unslash($_REQUEST['wp_scrape_key'])), 0, 32);
    $nonce = wp_unslash($_REQUEST['wp_scrape_nonce']);
    if (get_transient('scrape_key_' . $key) !== $nonce) {
        echo "###### wp_scraping_result_start:{$key} ######";
        echo wp_json_encode(array('code' => 'scrape_nonce_failure', 'message' => __('Scrape key check failed. Please try again.')));
        echo "###### wp_scraping_result_end:{$key} ######";
        die;
    }
    if (!defined('WP_SANDBOX_SCRAPING')) {
        define('WP_SANDBOX_SCRAPING', true);
    }
    register_shutdown_function('wp_finalize_scraping_edited_file_errors', $key);
}

WordPress Version: 5.2

/**
 * Start scraping edited file errors.
 *
 * @since 4.9.0
 */
function wp_start_scraping_edited_file_errors()
{
    if (!isset($_REQUEST['wp_scrape_key']) || !isset($_REQUEST['wp_scrape_nonce'])) {
        return;
    }
    $key = substr(sanitize_key(wp_unslash($_REQUEST['wp_scrape_key'])), 0, 32);
    $nonce = wp_unslash($_REQUEST['wp_scrape_nonce']);
    if (get_transient('scrape_key_' . $key) !== $nonce) {
        echo "###### wp_scraping_result_start:{$key} ######";
        echo wp_json_encode(array('code' => 'scrape_nonce_failure', 'message' => __('Scrape nonce check failed. Please try again.')));
        echo "###### wp_scraping_result_end:{$key} ######";
        die;
    }
    if (!defined('WP_SANDBOX_SCRAPING')) {
        define('WP_SANDBOX_SCRAPING', true);
    }
    register_shutdown_function('wp_finalize_scraping_edited_file_errors', $key);
}

WordPress Version: 4.9

/**
 * Start scraping edited file errors.
 *
 * @since 4.9.0
 */
function wp_start_scraping_edited_file_errors()
{
    if (!isset($_REQUEST['wp_scrape_key']) || !isset($_REQUEST['wp_scrape_nonce'])) {
        return;
    }
    $key = substr(sanitize_key(wp_unslash($_REQUEST['wp_scrape_key'])), 0, 32);
    $nonce = wp_unslash($_REQUEST['wp_scrape_nonce']);
    if (get_transient('scrape_key_' . $key) !== $nonce) {
        echo "###### wp_scraping_result_start:{$key} ######";
        echo wp_json_encode(array('code' => 'scrape_nonce_failure', 'message' => __('Scrape nonce check failed. Please try again.')));
        echo "###### wp_scraping_result_end:{$key} ######";
        die;
    }
    register_shutdown_function('wp_finalize_scraping_edited_file_errors', $key);
}