Свойство | Type | Description | |
---|---|---|---|
$_taxonomy | string | The taxonomy name. |
Méthode | Description | |
---|---|---|
__construct ( string $taxonomy = null ) | Constructor. | |
addPostTerms ( integer $post_id, array $terms, string $taxonomy, boolean $append = true ) : array | Adds terms to a post. | |
getObjectById ( integer $term_id ) : mixed | Returns generated term by id. |
Méthode | Description | |
---|---|---|
_createObject ( array $args ) : integer | WP_Error | Generates a new term. | |
_deleteObject ( integer $term_id ) : boolean | Deletes previously generated term. | |
_updateObject ( mixed $term, array $fields ) : mixed | Updates generated term. |
public __construct ( string $taxonomy = null ) | ||
$taxonomy | string | The taxonomy name. |
protected _createObject ( array $args ) : integer | WP_Error | ||
$args | array | The array of arguments to use during a new term creation. |
Résultat | integer | WP_Error | The newly created term's ID on success, otherwise a WP_Error object. |
protected _deleteObject ( integer $term_id ) : boolean | ||
$term_id | integer | The term id to delete. |
Résultat | boolean | TRUE on success, otherwise FALSE. |
public addPostTerms ( integer $post_id, array $terms, string $taxonomy, boolean $append = true ) : array | ||
$post_id | integer | The post id to add terms to. |
$terms | array | The array of terms to add. |
$taxonomy | string | The taxonomy name of terms. |
$append | boolean | Determines whether to add or replace terms. |
Résultat | array | The array of affected term IDs. |
public getObjectById ( integer $term_id ) : mixed | ||
$term_id | integer | The term id. |
Résultat | mixed | The generated term on success, otherwise NULL or a WP_Error object. |