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()


Top ↑

Return Return

(array|WP_Error) An array containing the term_id and term_taxonomy_id, WP_Error otherwise.


Top ↑

Source Source

File: bp-core/bp-core-taxonomy.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
7.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.