Post_Thumbnail::__unserialize( array $data )
PHP 8.0+ compatible implementation of the unserialization logic.
Contents
Parameters
- $data
-
(array) (Required) The data to unserialize.
Source
File: src/Tribe/Utils/Post_Thumbnail.php
public function __unserialize( array $data ): void {
array_walk( $data, static function ( &$data_entry ) {
if ( is_array( $data_entry ) ) {
$data_entry = (object) $data_entry;
}
} );
$this->post_id = $data['post_id'];
unset( $data['post_id'] );
$this->data = ! empty( $data ) ? $data : null;
}
Changelog
| Version | Description |
|---|---|
| 5.0.6 | Introduced. |