LLMS_Track::__construct( int|string|obj $term )

Constructor


Parameters Parameters

$term

(int|string|obj) (Required) term_id, term_slug, or instance of a WP_Term


Top ↑

Source Source

File: includes/class.llms.track.php

	public function __construct( $term ) {

		if ( is_numeric( $term ) ) {

			$this->term = get_term( $term, $this->taxonomy );

		} elseif ( is_string( $term ) ) {

			$this->term = get_term_by( 'slug', $term, $this->taxonomy );

		} elseif ( $term instanceof WP_Term ) {

			$this->term = $term;

		}

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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