bp_insert_term( string $term, string $taxonomy = '', array $args = array() )
Add a new taxonomy term to the database.
Description Description
Parameters Parameters
- $term
-
(Required) The BP term name to add.
- $taxonomy
-
(Optional) The BP taxonomy to which to add the BP term.
Default value: ''
- $args
-
(Optional) Array of arguments for inserting a BP term.
- 'description'
(string) The term description. Default empty string. - 'slug'
(string) The term slug to use. Default empty string. - 'metas'
(array) The term metas to add.
Default value: array()
- 'description'
Return Return
(array|WP_Error) An array containing the term_id
and term_taxonomy_id
, WP_Error otherwise.
Source Source
File: bp-core/bp-core-taxonomy.php
Changelog Changelog
Version | Description |
---|---|
7.0.0 | Introduced. |