bp_registration_options_admin_messages

Adds our admin notices with pending users info, for people who can manage users.

Description

bp_registration_options_admin_messages(); 

Usage

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

Defined (1)

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

/includes/admin.php  
  1. function bp_registration_options_admin_messages() { 
  2.  
  3.  
  4. if ( $member_requests > 0 && isset( $_GET['page'] ) != 'bp_registration_options_member_requests' && current_user_can( 'add_users' ) ) { 
  5.  
  6. $message = '<div class="error"><p>'; 
  7.  
  8. $message .= sprintf( 
  9. _n( 
  10. 'You have %d new member request that needs to be approved or denied.',  
  11. 'You have %d new memberrequeststhat needs to be approved or denied.',  
  12. $member_requests,  
  13. 'bp-registration-options' 
  14. ),  
  15. $member_requests 
  16. ); 
  17. $message .= ' ' . sprintf( 
  18. /** translators: placeholder will have linked "click here" that goes torequestspage. */ 
  19. __( 'Please %s to take action', 'bp-registration-options' ),  
  20. sprintf( 
  21. '<a href="%s">%s</a>',  
  22. admin_url( '/admin.php?page=bp_registration_options_member_requests' ),  
  23. __( 'click here', 'bp-registration-options' ) 
  24. ); 
  25.  
  26. $message .= '</p></div>'; 
  27.  
  28. echo $message;