WP_Error::merge_from() WordPress Method

The WP_Error::merge_from() method is used to merge another WP_Error object into the current one. This is useful for combining multiple error objects into a single one.

WP_Error::merge_from( WP_Error $error ) #

Merges the errors in the given error object into this one.


Parameters

$error

(WP_Error)(Required)Error object to merge.


Top ↑

Source

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

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

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.