bp_activity_mentions_script ()

排队@提到JS。

描述

文件:bp-activity / bp-activity-cssjs.php

函数bp_activity_mentions_script() {if (!Bp_activity_maybe_load_mentions_scripts ()) {return;//在wp-admin中新建/编辑屏幕的特殊处理。If (is_admin()) {If (!get_current_screen () | | !In_array (get_current_screen()->base, array('page', 'post')) || !Post_type_supports (get_current_screen()->post_type, '编辑器')){return;}} $min = bp_core_get_minified_asset_suffix();Wp_enqueue_script ('bp-提词',buddypress()->plugin_url。"bp-activity/js/提到{$min}.js", array('jquery', 'jquery-atwho'), bp_get_version(), true); wp_enqueue_style( 'bp-mentions-css', buddypress()->plugin_url . "bp-activity/css/mentions{$min}.css", array(), bp_get_version() ); wp_style_add_data( 'bp-mentions-css', 'rtl', true ); if ( $min ) { wp_style_add_data( 'bp-mentions-css', 'suffix', $min ); } wp_localize_script( 'bp-mentions', 'BP_Mentions_Options', bp_at_mention_default_options() ); // If the script has been enqueued, let's attach our mentions TinyMCE init callback. add_filter( 'tiny_mce_before_init', 'bp_add_mentions_on_tinymce_init', 10, 2 ); /** * Fires at the end of the Activity Mentions script. * * This is the hook where BP components can add their own prefetched results * friends to the page for quicker @mentions lookups. * * @since BuddyPress 2.1.0 */ do_action( 'bp_activity_mentions_prime_results' ); }

更新日志

更新日志
版本 描述
BuddyPress魅惑 介绍了。

问题吗?

我们总是很乐意帮助您解决代码或其他问题!搜索我们的开发人员文档联络支持,或与我们联系销售团队