• LifterLMS
  • Knowledge Base
  • Academy
  • Blog
  • Podcast
  • Contributors
  • My Account

LifterLMS LifterLMS

  • Code Reference
  • REST API
  • LLMS-CLI

Code Reference

Skip to content
Filter by type:
Search
Browse: Home / Code Reference / Classes / LLMS_User_Postmeta / LLMS_User_Postmeta::__construct()

LLMS_User_Postmeta::__construct( mixed $item = null, boolean $hydrate = true )

Constructor

Contents

  • Parameters
  • Source
  • Related
    • Uses
    • Used By
  • Changelog
  • User Contributed Notes

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


Top ↑

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


Top ↑

Related #Related

Uses #Uses

Uses
Uses Description
includes/abstracts/llms.abstract.database.store.php: LLMS_Abstract_Database_Store::__construct()

Constructor

Top ↑

Used By #Used By

Used By
Used By Description
includes/functions/llms.functions.user.postmeta.php: llms_delete_user_postmeta()

Delete user postmeta data.

includes/functions/llms.functions.user.postmeta.php: llms_update_user_postmeta()

Update user postmeta data.

includes/class.llms.query.user.postmeta.php: LLMS_Query_User_Postmeta::get_metas()

Retrieve an array of LLMS_User_Postmetas for the given set of results


Top ↑

Changelog #Changelog

Changelog
Version Description
3.21.0 Unknown.
3.15.0 Introduced.

Top ↑

User Contributed Notes #User Contributed Notes

You must log in before being able to contribute a note or feedback.

© 2014 - 2023 LifterLMS · Privacy Policy · Terms and Conditions

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.