bp_core_register_common_styles

Register styles commonly used by BuddyPress.

Description

bp_core_register_common_styles(); 

Usage

  1. if ( !function_exists( 'bp_core_register_common_styles' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-cssjs.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_core_register_common_styles(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-core/bp-core-cssjs.php  
  1. function bp_core_register_common_styles() { 
  2. $url =buddypress)->plugin_url . 'bp-core/css/'; 
  3.  
  4. /** 
  5. * Filters the URL for the Admin Bar stylesheet. 
  6. * @since 1.1.0 
  7. * @param string $value URL for the Admin Bar stylesheet. 
  8. */ 
  9. $admin_bar_file = apply_filters( 'bp_core_admin_bar_css', "{$url}admin-bar{$min}.css" ); 
  10.  
  11. /** 
  12. * Filters the BuddyPress Core stylesheet files to register. 
  13. * @since 2.1.0 
  14. * @param array $value Array of stylesheet file information to register. 
  15. */ 
  16. 'bp-admin-bar' => array( 
  17. 'file' => $admin_bar_file,  
  18. 'dependencies' => array( 'admin-bar' ) 
  19. ),  
  20. 'bp-avatar' => array( 
  21. 'file' => "{$url}avatar{$min}.css",  
  22. 'dependencies' => array( 'jcrop' ) 
  23. ),  
  24. ) ); 
  25.  
  26. foreach ( $styles as $id => $style ) { 
  27. wp_register_style( $id, $style['file'], $style['dependencies'], bp_get_version() ); 
  28.  
  29. wp_style_add_data( $id, 'rtl', true ); 
  30. if ( $min ) { 
  31. wp_style_add_data( $id, 'suffix', $min );