bp_core_register_common_styles()
Register styles commonly used by BuddyPress.
Description
Source
File: bp-core/bp-core-cssjs.php
function bp_core_register_common_styles() { $min = bp_core_get_minified_asset_suffix(); $url = buddypress()->plugin_url . 'bp-core/css/'; /** * Filters the URL for the Admin Bar stylesheet. * * @since BuddyPress 1.1.0 * * @param string $value URL for the Admin Bar stylesheet. */ $admin_bar_file = apply_filters( 'bp_core_admin_bar_css', "{$url}admin-bar{$min}.css" ); /** * Filters the BuddyBoss Core stylesheet files to register. * * @since BuddyPress 2.1.0 * * @param array $value Array of stylesheet file information to register. */ $styles = apply_filters( 'bp_core_register_common_styles', array( 'bp-admin-bar' => array( 'file' => $admin_bar_file, 'dependencies' => array( 'admin-bar' ) ), 'bp-avatar' => array( 'file' => "{$url}avatar{$min}.css", 'dependencies' => array( 'jcrop' ) ), 'emojionearea' => array( 'file' => "{$url}emojionearea-edited{$min}.css", 'dependencies' => array() ), 'bp-medium-editor' => array( 'file' => "{$url}medium-editor{$min}.css", 'dependencies' => array() ), 'bp-medium-editor-beagle' => array( 'file' => "{$url}medium-editor-beagle{$min}.css", 'dependencies' => array() ), ) ); foreach ( $styles as $id => $style ) { wp_register_style( $id, $style['file'], $style['dependencies'], bp_get_version() ); wp_style_add_data( $id, 'rtl', true ); if ( $min ) { wp_style_add_data( $id, 'suffix', $min ); } } }
Changelog
Version | Description |
---|---|
BuddyPress 2.1.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.