WPDK
1.5.0
WordPress Development Kit
|
Public Member Functions | |
ancestor () | |
Ancestor. More... | |
Static Public Member Functions | |
static | term ($term, $taxonomy=false, $output=OBJECT, $filter= 'raw', $parent=false) |
Get term. More... | |
static | ancestorOfTerm (WPDKterm $term) |
Ancestor. More... | |
Data Fields | |
$count | |
$description | |
$name | |
$parent | |
$parent_term | |
$slug | |
$taxonomy | |
$term_group | |
$term_id | |
$term_taxonomy_id | |
$permalink | |
A replacement experimental of standrd WordPress term object.
This class introducing a lot of feature for term management.
$term = WPDKTerm::term( '%colors' ); // get by name $term = WPDKTerm::term( 'colors-house' ); // get by slug $term = WPDKTerm::term( 116 ); // get by id $term = WPDKTerm::term( 116, 'custom-tax' ); // get by id witha custom taxonomy $ancestor = WPDKTerm::ancestor( $term ); // get the ancestor (top parent)
Definition at line 24 of file wpdk-terms.php.
ancestor | ( | ) |
Ancestor.
Return the ancestor (top parent) WPDKTerm object. If FALSE no ancestor object found.
Definition at line 132 of file wpdk-terms.php.
|
static |
Ancestor.
Return the ancestor (top parent) WPDKTerm object. If FALSE no ancestor object found.
Definition at line 146 of file wpdk-terms.php.
|
static |
Get term.
Return an instance of WPDKTerm class as extended-map of WordPress term.
int | object | string | $term | If integer, will get from database. If object will apply filters and return $term. If string started with % will get by `get_term_by( 'name' ) Else if string will get by get_term_by( 'slug' )` |
string | $taxonomy | Optipnal. Taxonomy name that $term is part of. If FASLE retrive the term info |
string | $output | Optional. Constant OBJECT, ARRAY_A, or ARRAY_N |
string | $filter | Optional. Default is raw or no WordPress defined filter will applied. |
bool | $parent | Optional. If TRUE an object WPDKTerm is create in parent_term property |
Definition at line 77 of file wpdk-terms.php.
$count |
Definition at line 26 of file wpdk-terms.php.
$description |
Definition at line 27 of file wpdk-terms.php.
$name |
Definition at line 28 of file wpdk-terms.php.
$parent |
Definition at line 29 of file wpdk-terms.php.
$parent_term |
Definition at line 30 of file wpdk-terms.php.
$permalink |
Definition at line 36 of file wpdk-terms.php.
$slug |
Definition at line 31 of file wpdk-terms.php.
$taxonomy |
Definition at line 32 of file wpdk-terms.php.
$term_group |
Definition at line 33 of file wpdk-terms.php.
$term_id |
Definition at line 34 of file wpdk-terms.php.
$term_taxonomy_id |
Definition at line 35 of file wpdk-terms.php.