WP_Ajax_Response::__construct()
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() WP Ajax Response:: construct code WP 6.7.1
public function __construct( $args = '' ) { if ( ! empty( $args ) ) { $this->add( $args ); } }