Свойство | Type | Description | |
---|---|---|---|
$count | |||
$description | |||
$name | |||
$parent | |||
$parent_term | |||
$permalink | |||
$slug | |||
$taxonomy | |||
$term_group | |||
$term_id | |||
$term_taxonomy_id |
Méthode | Description | |
---|---|---|
ancestor ( ) : boolean | WPDKTerm | Return the ancestor (top parent) WPDKTerm object. If FALSE no ancestor object found. | |
ancestorOfTerm ( WPDKterm $term ) : boolean | WPDKTerm | Return the ancestor (top parent) WPDKTerm object. If FALSE no ancestor object found. | |
term ( integer | object | string $term, string $taxonomy = false, string $output = OBJECT, string $filter = 'raw', boolean $parent = false ) : WPDKTerm | WP_Error | Return an instance of WPDKTerm class as extended-map of WordPress term. |
Méthode | Description | |
---|---|---|
__construct ( object $term ) : WPDKTerm | Create an instance of WPDKTerm class |
public static ancestorOfTerm ( WPDKterm $term ) : boolean | WPDKTerm | ||
$term | WPDKterm | An instance of WPDKTerm class |
Résultat | boolean | WPDKTerm |
public static term ( integer | object | string $term, string $taxonomy = false, string $output = OBJECT, string $filter = 'raw', boolean $parent = false ) : WPDKTerm | WP_Error | ||
$term | integer | object | string | 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' )` |
$taxonomy | string | Optipnal. Taxonomy name that $term is part of. If FASLE retrive the term info |
$output | string | Optional. Constant OBJECT, ARRAY_A, or ARRAY_N |
$filter | string | Optional. Default is raw or no WordPress defined filter will applied. |
$parent | boolean | Optional. If TRUE an object WPDKTerm is create in parent_term property |
Résultat | WPDKTerm | WP_Error | Term Row from database. Will return null if $term is empty. If taxonomy does not exist then WP_Error will be returned. |