Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/12/2016 04:04:52 PM (9 years ago)
Author:
boonebgorges
Message:

Undeprecate Messages autocomplete scripts and styles.

These assets were deprecated in [8559], with the intention of rewriting the
functionality using BP_Suggestions. Until that rewrite happens, let's bring
them back from the dead.

Fixes #6740.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-cssjs.php

    r10417 r10446  
    2020        add_action( 'wp_head', 'messages_autocomplete_init_jsblock' );
    2121
    22         wp_enqueue_script( 'bp-jquery-autocomplete' );
    23         wp_enqueue_script( 'bp-jquery-autocomplete-fb' );
    24         wp_enqueue_script( 'bp-jquery-bgiframe' );
    25         wp_enqueue_script( 'bp-jquery-dimensions' );
     22        $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     23        $url = buddypress()->plugin_url . 'bp-messages/js/';
     24
     25        wp_enqueue_script( 'bp-jquery-autocomplete', "{$url}autocomplete/jquery.autocomplete{$min}.js", array( 'jquery' ), bp_get_version() );
     26        wp_enqueue_script( 'bp-jquery-autocomplete-fb', "{$url}autocomplete/jquery.autocompletefb{$min}.js", array( 'jquery' ), bp_get_version() );
     27        wp_enqueue_script( 'bp-jquery-bgiframe', "{$url}autocomplete/jquery.bgiframe{$min}.js", array( 'jquery' ), bp_get_version() );
     28        wp_enqueue_script( 'bp-jquery-dimensions', "{$url}autocomplete/jquery.dimensions{$min}.js", array( 'jquery' ), bp_get_version() );
    2629    }
    2730}
     
    3538function messages_add_autocomplete_css() {
    3639    if ( bp_is_messages_component() && bp_is_current_action( 'compose' ) ) {
    37         wp_enqueue_style( 'bp-messages-autocomplete' );
     40        $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
     41        $url = buddypress()->plugin_url . 'bp-messages/css/';
     42
     43        wp_register_style( 'bp-messages-autocomplete', "{$url}autocomplete/jquery.autocompletfb{$min}.css", array(), bp_get_version() );
     44
     45        wp_style_add_data( 'bp-messages-autocomplete', 'rtl', true );
     46        if ( $min ) {
     47            wp_style_add_data( 'bp-messages-autocomplete', 'suffix', $min );
     48        }
     49
    3850        wp_print_styles();
    3951    }
Note: See TracChangeset for help on using the changeset viewer.