Core Function
View Source on Trac ↗ wp_delete_term()
wp_delete_term( mixed $term, mixed $taxonomy, mixed $args = array() ) Removes a term from the database.
Parameters 3 required
| Name / Type | Description |
|---|---|
| $term int | Term ID. Required |
| $taxonomy string | Taxonomy name. Required |
| mixed | (array | string) $args { Optional. Array of arguments to override the default term ID. Default empty array. Required |
Return Value
((bool)
(bool | int | WP_Error) True on success, false if term does not exist. Zero on attempted
deletion of default Category. WP_Error if the taxonomy does not exist.
Function Information
Since Version
2.3.0
Source File
wp-includes/taxonomy.php
Advertisement