wp_finalize_scraping_edited_file_errors() WordPress Function

The wp_finalize_scraping_edited_file_errors() function is used to finalize the scraping of an edited file for errors. This function will check for errors in the file and return an array of error messages.

wp_finalize_scraping_edited_file_errors( string $scrape_key ) #

Finalize scraping for edited file errors.


Parameters

$scrape_key

(string)(Required)Scrape key.


Top ↑

Source

File: wp-includes/load.php

function wp_finalize_scraping_edited_file_errors( $scrape_key ) {
	$error = error_get_last();
	echo "\n###### wp_scraping_result_start:$scrape_key ######\n";
	if ( ! empty( $error ) && in_array( $error['type'], array( E_CORE_ERROR, E_COMPILE_ERROR, E_ERROR, E_PARSE, E_USER_ERROR, E_RECOVERABLE_ERROR ), true ) ) {
		$error = str_replace( ABSPATH, '', $error );
		echo wp_json_encode( $error );
	} else {
		echo wp_json_encode( true );
	}
	echo "\n###### wp_scraping_result_end:$scrape_key ######\n";
}


Top ↑

Changelog

Changelog
VersionDescription
4.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.