WP_Error::export_to() WordPress Method

The WP_Error::export_to() method is used to export the contents of a WP_Error object to an array. This is useful for debugging purposes or for displaying the error to the user.

WP_Error::export_to( WP_Error $error ) #

Exports the errors in this object into the given one.


Parameters

$error

(WP_Error)(Required)Error object to export into.


Top ↑

Source

File: wp-includes/class-wp-error.php

	public function export_to( WP_Error $error ) {
		static::copy_errors( $this, $error );
	}

Top ↑

Changelog

Changelog
VersionDescription
5.6.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.