messages_add_autocomplete_js()
Enqueue the JS for messages autocomplete.
Description
Source
File: bp-messages/bp-messages-cssjs.php
function messages_add_autocomplete_js() { // Include the autocomplete JS for composing a message. if ( bp_is_messages_component() && bp_is_current_action( 'compose' ) ) { add_action( 'wp_head', 'messages_autocomplete_init_jsblock' ); $min = bp_core_get_minified_asset_suffix(); $url = buddypress()->plugin_url . 'bp-messages/js/'; wp_enqueue_script( 'bp-jquery-autocomplete', "{$url}autocomplete/jquery.autocomplete{$min}.js", array( 'jquery' ), bp_get_version() ); wp_enqueue_script( 'bp-jquery-autocomplete-fb', "{$url}autocomplete/jquery.autocompletefb{$min}.js", array( 'jquery' ), bp_get_version() ); wp_enqueue_script( 'bp-jquery-bgiframe', "{$url}autocomplete/jquery.bgiframe{$min}.js", array( 'jquery' ), bp_get_version() ); wp_enqueue_script( 'bp-jquery-dimensions', "{$url}autocomplete/jquery.dimensions{$min}.js", array( 'jquery' ), bp_get_version() ); } }
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.