bbdev

Buddyboss media - Bind modal mentions

May 25th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_action( 'wp_footer', 'buddyboss_media_modal_uploader_mention_script' );
  2. function buddyboss_media_modal_uploader_mention_script(){
  3.     if( !function_exists( 'buddyboss_media' ) )
  4.         return;
  5.     ?>
  6.     <style type="text/css">
  7.     .atwho-view{
  8.         z-index: 8011 !important;
  9.     }    
  10.     </style>
  11.  
  12.     <script type="text/javascript">
  13.         jQuery(document).ready(function($){
  14.             $(".buddyboss-comment-media-bulk-uploader-text, #buddyboss-media-bulk-uploader-text").each(function(){
  15.                 if( !$(this).hasClass('bp-suggestions') ){
  16.                     $(this).addClass('bp-suggestions').bp_mentions( bp.mentions.users );
  17.                 }
  18.             });
  19.         });
  20.     </script>
  21.     <?php
  22. }
Add Comment
Please, Sign In to add comment