[ Index ] |
PHP Cross Reference of BuddyPress |
[Source view] [Print] [Project Stats]
BuddyPress taxonomy functions. Most BuddyPress taxonomy functions are wrappers for their WordPress counterparts. Because BuddyPress can be activated in various ways in a network environment, we must switch to the root blog before using the WP functions.
File Size: | 502 lines (14 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
bp_get_default_taxonomies() X-Ref |
Returns default BuddyPress taxonomies. since: 7.0.0 return: array The BuddyPress default taxonomies. |
bp_register_default_taxonomies() X-Ref |
Register our default taxonomies. since: 2.2.0 |
bp_get_taxonomy_term_site_id( $taxonomy = '' ) X-Ref |
Gets the ID of the site that BP should use for taxonomy term storage. Defaults to the root blog ID. param: string $taxonomy Taxonomy slug to check for. since: 2.6.0 return: int |
bp_set_object_terms( $object_id, $terms, $taxonomy, $append = false ) X-Ref |
Set taxonomy terms on a BuddyPress object. param: int $object_id Object ID. param: string|array $terms Term or terms to set. param: string $taxonomy Taxonomy name. param: bool $append Optional. True to append terms to existing terms. Default: false. since: 2.2.0 return: array Array of term taxonomy IDs. |
bp_get_object_terms( $object_ids, $taxonomies, $args = array() X-Ref |
Get taxonomy terms for a BuddyPress object. param: int|array $object_ids ID or IDs of objects. param: string|array $taxonomies Name or names of taxonomies to match. param: array $args See {@see wp_get_object_terms()}. since: 2.2.0 return: array |
bp_remove_object_terms( $object_id, $terms, $taxonomy ) X-Ref |
Remove taxonomy terms on a BuddyPress object. param: int $object_id Object ID. param: string|array $terms Term or terms to remove. param: string $taxonomy Taxonomy name. since: 2.3.0 return: bool|WP_Error True on success, false or WP_Error on failure. |
bp_get_objects_in_term( $term_ids, $taxonomies, $args = array() X-Ref |
Retrieve IDs of objects in valid taxonomies and terms for BuddyPress-related taxonomies. Note that object IDs are from the `bp_get_taxonomy_term_site_id()`, which on some multisite configurations may not be the same as the current site. param: int|array $term_ids Term id or array of term ids of terms that will be used. param: string|array $taxonomies String of taxonomy name or Array of string values of taxonomy names. param: array|string $args Change the order of the object_ids, either ASC or DESC. since: 2.7.0 return: WP_Error|array If the taxonomy does not exist, then WP_Error will be returned. On success, |
bp_get_term_by( $field, $value, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) X-Ref |
Get term data for terms in BuddyPress taxonomies. Note that term data is from the `bp_get_taxonomy_term_site_id()`, which on some multisite configurations may not be the same as the current site. param: string $field Either 'slug', 'name', 'id' (term_id), or 'term_taxonomy_id' param: string|int $value Search for this term value param: string $taxonomy Taxonomy name. Optional, if `$field` is 'term_taxonomy_id'. param: string $output Constant OBJECT, ARRAY_A, or ARRAY_N param: string $filter Optional, default is raw or no WordPress defined filter will applied. since: 2.7.0 return: WP_Term|bool WP_Term instance on success. Will return false if `$taxonomy` does not exist |
bp_insert_term( $term, $taxonomy = '', $args = array() X-Ref |
Add a new taxonomy term to the database. param: string $term The BP term name to add. param: string $taxonomy The BP taxonomy to which to add the BP term. param: array $args { since: 7.0.0 return: array|WP_Error An array containing the `term_id` and `term_taxonomy_id`, |
bp_get_terms( $args = array() X-Ref |
Get taxonomy BP Terms from the database. param: array $args { since: 7.0.0 return: array The list of terms matching arguments. |
bp_delete_term( $term_id = 0, $taxonomy = '' ) X-Ref |
Deletes a BP Term. param: int $term_id The BP Term ID. Required. param: string $taxonomy The BP Taxonomy Name. Required. since: 7.0.0 return: bool|WP_Error True on success, WP_Error on failure. |
Generated: Sun Dec 22 01:00:54 2024 | Cross-referenced by PHPXref 0.7.1 |