bp_nouveau_messages_catch_hook_content( array $hooks = array() )
Fires Messages Legacy hooks to catch the content and add them as extra keys to the JSON Messages UI reply.
Description
Parameters
- $hooks
-
(Optional) The list of hooks to fire.
Default value: array()
Return
(array) An associative containing the caught content.
Source
File: bp-templates/bp-nouveau/includes/messages/functions.php
495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 | function bp_nouveau_messages_catch_hook_content( $hooks = array () ) { $content = array (); ob_start(); foreach ( $hooks as $js_key => $hook ) { if ( ! has_action( $hook ) ) { continue ; } // Fire the hook. do_action( $hook ); // Catch the sanitized content. $content [ $js_key ] = bp_strip_script_and_style_tags( ob_get_contents() ); // Clean the buffer. ob_clean(); } ob_end_clean(); return $content ; } |
Changelog
Version | Description |
---|---|
BuddyPress 3.0.1 | 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.