wordpress / latest / classes / wp_ajax_response / __construct.html

WP_Ajax_Response::__construct( string|array $args = '' )

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

Description

See also

Parameters

$args string|array Optional
Will be passed to add() method.

Default: ''

Source

File: wp-includes/class-wp-ajax-response.php. View all references

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

Uses

Uses Description

Used By

Used By Description

Changelog

Version Description
2.1.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_ajax_response/__construct