[buddypress-trac] [BuddyPress Trac] #4824: Autocomplete

buddypress-trac noreply at wordpress.org
Fri May 6 16:29:11 UTC 2016


#4824: Autocomplete
-----------------------------------+-----------------------
 Reporter:  stefwilliams           |       Owner:
     Type:  defect (bug)           |      Status:  reopened
 Priority:  normal                 |   Milestone:
Component:  Component - Messaging  |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:                         |
-----------------------------------+-----------------------

Comment (by pareshradadiya):

 this is not ideal but there is work-around at the moment.

 {{{#!php
 <?php

        /**
          * Lets preclude the wp_editor from enqueue 'jquery-ui-
 autocomplete' script.
          *
          * Provisional fix for the wordpress core autocomplete
          * conflict wit buddypress autocomplete
          *
          * @todo Remove the 'tiny_mce_plugins' and 'quicktags_settings'
 filters once get fixed in the buddypress core
          */
         add_filter( 'tiny_mce_plugins', function ( $plugins ) {

             if ( ( $key = array_search( 'wplink', $plugins ) ) !== false )
 {
                 // Remove 'wplink' from the internal plugins if added with
 'tiny_mce_plugins' filter to prevent errors.
                 // It can be added with 'mce_external_plugins'.
                 unset( $plugins[$key] );
             }
             return $plugins;
         });

         add_filter( 'quicktags_settings', function ( $qtInit, $editor_id )
 {
             // Remove 'link' from the quicktag button to prevent errors.
             if ( ( $key = array_search( 'link', $qtInit['buttons'] ) ) !==
 false ) {
                 $qtInit['buttons'] = str_replace( 'link,', '',
 $qtInit['buttons'] );
             }
             return $qtInit;
         });
 }}}

 ```

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4824#comment:7>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list