ACF_Local_Meta::remove
remove
Removes postmeta from storage.
Method of the class: ACF_Local_Meta{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ACF_Local_Meta = new ACF_Local_Meta(); $ACF_Local_Meta->remove( $post_id );
- $post_id(mixed)
- The post_id for this data.
Changelog
| Since 5.8.0 | Introduced. |
ACF_Local_Meta::remove() ACF Local Meta::remove code ACF 6.8.8
function remove( $post_id = 0 ) {
// unset meta
unset( $this->meta[ $post_id ] );
// reset post_id
if ( $post_id === $this->post_id ) {
$this->post_id = 0;
}
}