LLMS_User_Postmeta::__construct( mixed $item = null, boolean $hydrate = true )
Constructor
Parameters Parameters
- $item
-
(mixed) (Optional) Meta_id of a user postmeta item or an object with at least an "id".
Default value: null
- $hydrate
-
(boolean) (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
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | 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.21.0 | Unknown. |
3.15.0 | Introduced. |