bp_nouveau_messages_register_scripts( array $scripts = array() )
Register Scripts for the Messages component
Description
Parameters
- $scripts
-
(Optional) The array of scripts to register
Default value: array()
Return
(array) The same array with the specific messages scripts.
Source
File: bp-templates/bp-nouveau/includes/messages/functions.php
function bp_nouveau_messages_register_scripts( $scripts = array() ) {
if ( ! isset( $scripts['bp-nouveau'] ) ) {
return $scripts;
}
return array_merge( $scripts, array(
'bp-nouveau-select2' => array(
'file' => buddypress()->plugin_url . 'bp-core/js/vendor/select2.min.js',
'footer' => false,
),
'bp-nouveau-messages-at' => array(
'file' => buddypress()->plugin_url . 'bp-activity/js/mentions%s.js',
'dependencies' => array( 'bp-nouveau', 'jquery', 'jquery-atwho' ),
'version' => bp_get_version(),
'footer' => true,
),
'bp-nouveau-messages' => array(
'file' => 'js/buddypress-messages%s.js',
'dependencies' => array( 'bp-nouveau', 'json2', 'wp-backbone', 'bp-nouveau-messages-at', 'bp-nouveau-select2' ),
'footer' => true,
),
) );
}
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.