WordPress at a glance
function is not described

WP_Ajax_Response::__construct() public WP 2.1.0

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

It's a method of the class: WP_Ajax_Response{}

No Hooks.

Return

Null. Nothing.

Usage

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

Notes

  • See: WP_Ajax_Response::add()

Changelog

Since 2.1.0 Introduced.

Code of WP_Ajax_Response::__construct() WP 5.5.1

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