bp_registration_options_send_admin_email

Send an email to the administrator email upon new user registration.

Description

bp_registration_options_send_admin_email( (array) $args = array() ); 

Parameters (1)

0. $args — Optional. (array) => array()
Array of arguments for the email.

Usage

  1. if ( !function_exists( 'bp_registration_options_send_admin_email' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bp-registration-options/includes/core.php'; 
  3.  
  4. // Array of arguments for the email. 
  5. $args = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_registration_options_send_admin_email($args); 
  9.  

Defined (1)

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

/includes/core.php  
  1. function bp_registration_options_send_admin_email( $args = array() ) { 
  2.  
  3. $args = wp_parse_args( $args, array( 
  4. 'user_login' => '',  
  5. 'user_email' => '',  
  6. 'message' => '',  
  7. ) ); 
  8.  
  9. /** 
  10. * Filters the email address(es) to send admin notifications to. 
  11. * @since 4.3.0 
  12. * @param array $value Array of email addresses to send notification to. 
  13. */ 
  14. $admin_email = apply_filters( 'bprwg_admin_email_addresses', array( get_bloginfo( 'admin_email' ) ) ); 
  15.  
  16. /** 
  17. * Filters the email text for admin when new member signs up. 
  18. * @since 4.2.0 
  19. * @param string $value Message to send. 
  20. * @param string $value User login name. 
  21. * @param string $value User email address. 
  22. */ 
  23. $mod_email = apply_filters( 'bprwg_new_member_request_admin_email_message', $args['message'], $args['user_login'], $args['user_email'] ); 
  24.  
  25.  
  26. wp_mail( $admin_email, __( 'New Member Request', 'bp-registration-options' ), $mod_email ); 
  27.