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
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;
}
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |