ACF_Data::__construct
__construct
Sets up the class functionality.
Method of the class: ACF_Data{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ACF_Data = new ACF_Data(); $ACF_Data->__construct( $data );
- $data(array)
- Optional data to set.
Default:false
Changelog
| Since 5.7.10 | Introduced. |
ACF_Data::__construct() ACF Data:: construct code ACF 6.8.8
function __construct( $data = false ) {
// Set cid.
$this->cid = acf_uniqid();
// Set data.
if ( $data ) {
$this->set( $data );
}
// Initialize.
$this->initialize();
}