bp_nouveau_messages_get_bulk_actions()
Output bulk actions for messages.
Description
Source
File: bp-templates/bp-nouveau/includes/messages/functions.php
function bp_nouveau_messages_get_bulk_actions() {
ob_start();
bp_messages_bulk_management_dropdown();
$bulk_actions = array();
$bulk_options = ob_get_clean();
$matched = preg_match_all( '/<option value="(.*?)"\s*>(.*?)<\/option>/', $bulk_options, $matches, PREG_SET_ORDER );
if ( $matched && is_array( $matches ) ) {
foreach ( $matches as $i => $match ) {
if ( 0 === $i ) {
continue;
}
if ( isset( $match[1] ) && isset( $match[2] ) ) {
$bulk_actions[] = array(
'value' => trim( $match[1] ),
'label' => trim( $match[2] ),
);
}
}
}
return $bulk_actions;
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 3.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.