Opened 9 years ago
Closed 9 years ago
#6939 closed defect (bug) (fixed)
autocomplete missing css
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.5.1 | Priority: | high |
Severity: | major | Version: | 2.5.0 |
Component: | Messages | Keywords: | commit |
Cc: |
Description
The autocomplete function to add css is bad.
There is a missing e in {$url}autocomplete/jquery.autocompletfb{$min}.css and it doesn't load.
Why is this using wp_head?
Could only get it to work by changing to this:
function messages_add_autocomplete_css() { if ( bp_is_messages_component() && bp_is_current_action( 'compose' ) ) { $min = bp_core_get_minified_asset_suffix(); $url = buddypress()->plugin_url . 'bp-messages/css/'; wp_register_style( 'bp-messages-autocomplete', "{$url}autocomplete/jquery.autocompletefb{$min}.css", array(), bp_get_version() ); wp_enqueue_style( 'bp-messages-autocomplete' ); wp_style_add_data( 'bp-messages-autocomplete', 'rtl', true ); if ( $min ) { wp_style_add_data( 'bp-messages-autocomplete', 'suffix', $min ); } wp_print_styles(); } } add_action( 'wp_enqueue_scripts', 'messages_add_autocomplete_css' );
Attachments (1)
Change History (9)
#3
@
9 years ago
- Milestone changed from 2.5 to 2.5.1
Hi,
thanks for your feedback, just to be sure : the year stylesheet === companion stylesheet ?
#4
@
9 years ago
Looks like the style is not enqueued at all actually. So i've changed wp_register_style
in favor of wp_enqueue_style
and fixed the missing e
.
#5
@
9 years ago
Styles are included in the year stylesheets
Yes can we clarify this somewhat cryptic remark :)
Best to refer to year sheets as companion styles as that's the name that has stuck (maybe not the best but...)
If there are styles corresponding to autocomplete in companion sheets then they will be or are supposed to be where corrections were needed for a given twenty* theme rather than all required styles, he said off top of head.
https://buddypress.trac.wordpress.org/browser/trunk/src/bp-messages/bp-messages-cssjs.php#L38