LLMS_User_Postmeta::__construct( mixed $item = null, bool $hydrate = true )
Constructor
Description Description
Parameters Parameters
- $item
-
(mixed) (Optional) meta_id of a user postmeta item or an object with at least an "id"
Default value: null
- $hydrate
-
(bool) (Optional) if true, hydrates the object on instantiation (if an ID was found via $item)
Default value: true
Source Source
File: includes/models/model.llms.user.postmeta.php
public function __construct( $item = null, $hydrate = true ) { if ( is_numeric( $item ) ) { $this->id = $item; } elseif ( is_object( $item ) && isset( $item->id ) ) { $this->id = $item->id; } parent::__construct(); if ( $this->id && $hydrate ) { $this->hydrate(); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.15.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: