BP_Admin::admin_register_styles()
Register styles commonly used by BuddyPress wp-admin screens.
Description
Source
File: bp-core/classes/class-bp-admin.php
public function admin_register_styles() { $min = bp_core_get_minified_asset_suffix(); $url = $this->css_url; /** * Filters the BuddyBoss Core Admin CSS file path. * * @since BuddyPress 1.6.0 * * @param string $file File path for the admin CSS. */ $common_css = apply_filters( 'bp_core_admin_common_css', "{$url}common{$min}.css" ); /** * Filters the BuddyPress admin stylesheet files to register. * * @since BuddyPress 2.5.0 * * @param array $value Array of admin stylesheet file information to register. */ $styles = apply_filters( 'bp_core_admin_register_styles', array( // Legacy. 'bp-admin-common-css' => array( 'file' => $common_css, 'dependencies' => array(), ), // 2.5 'bp-customizer-controls' => array( 'file' => "{$url}customizer-controls{$min}.css", 'dependencies' => array(), ), // 3.0 'bp-hello-css' => array( 'file' => "{$url}hello{$min}.css", 'dependencies' => array( 'bp-admin-common-css' ), ), ) ); $version = bp_get_version(); foreach ( $styles as $id => $style ) { wp_register_style( $id, $style['file'], $style['dependencies'], $version ); wp_style_add_data( $id, 'rtl', true ); if ( $min ) { wp_style_add_data( $id, 'suffix', $min ); } } }
Changelog
Version | Description |
---|---|
BuddyPress 2.5.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.