bbp_admin_separator

Add a separator to the WordPress admin menus.

Description

bbp_admin_separator(); 

Usage

  1. if ( !function_exists( 'bbp_admin_separator' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/admin/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bbp_admin_separator(); 
  7.  

Defined (1)

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

/includes/admin/functions.php  
  1. function bbp_admin_separator() { 
  2.  
  3. // Caps necessary where a separator is necessary 
  4. $caps = array( 
  5. bbp_forums_admin,  
  6. bbp_topics_admin,  
  7. bbp_replies_admin,  
  8. ); 
  9.  
  10. // Loop through caps, and look for a reason to show the separator 
  11. foreach ( $caps as $cap ) { 
  12. if ( current_user_can( $cap ) ) { 
  13. bbpress)->admin->show_separator = true; 
  14. break; 
  15.  
  16. // Bail if no separator 
  17. if ( false ===bbpress)->admin->show_separator ) { 
  18. return; 
  19.  
  20. global $menu; 
  21.  
  22. $menu[] = array( '', 'read', 'separator-bbpress', '', 'wp-menu-separatorbbpress );