WP_Ajax_Response::__construct()publicWP 2.1.0

Constructor - Passes args to WP_Ajax_Response::add().

Method of the class: WP_Ajax_Response{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Ajax_Response = new WP_Ajax_Response();
$WP_Ajax_Response->__construct( $args );
$args(string|array)
Will be passed to add() method.
Default: ''

Notes

Changelog

Since 2.1.0 Introduced.

WP_Ajax_Response::__construct() code WP 6.4.3

public function __construct( $args = '' ) {
	if ( ! empty( $args ) ) {
		$this->add( $args );
	}
}