bp_get_repeater_clone_field_ids_all( type $field_group_id )
Return ids of all field sets repeated instances.
Description
Parameters
- $field_group_id
-
(Required)
Return
(array)
Source
File: bp-xprofile/bp-xprofile-repeaters.php
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | function bp_get_repeater_clone_field_ids_all ( $field_group_id ) { global $wpdb ; $bp = buddypress(); $ids = array (); $template_field_ids = bp_get_repeater_template_field_ids( $field_group_id ); if ( empty ( $template_field_ids ) ) { return $ids ; } foreach ( $template_field_ids as $template_field_id ) { $sql = "select m1.object_id FROM { $bp ->profile->table_name_meta} as m1 WHERE m1.meta_key = '_cloned_from' AND m1.meta_value = %d"; $sql = $wpdb ->prepare( $sql , $template_field_id ); $results = $wpdb ->get_col( $sql ); if ( ! empty ( $results ) && !is_wp_error( $results ) ) { $ids = array_merge ( $ids , $results ); } } return $ids ; } |
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.