bp_get_request

The main action used for handling theme-side GET requests.

Description

bp_get_request(); 

Usage

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

Defined (1)

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

/bp-core/bp-core-dependency.php  
  1. function bp_get_request() { 
  2.  
  3. // Bail if not a POST action. 
  4. if ( ! bp_is_get_request() ) { 
  5. return; 
  6.  
  7. // Bail if no action. 
  8. if ( empty( $_GET['action'] ) ) { 
  9. return; 
  10.  
  11. // Sanitize the GET action. 
  12. $action = sanitize_key( $_GET['action'] ); 
  13.  
  14. /** 
  15. * Fires at the end of the bp_get_request function. 
  16. * This dynamic action is probably the one you want to use. It narrows down 
  17. * the scope of the 'action' without needing to check it in your function. 
  18. * @since 1.9.0 
  19. */ 
  20.  
  21. /** 
  22. * Fires at the end of the bp_get_request function. 
  23. * Use this static action if you don't mind checking the 'action' yourself. 
  24. * @since 1.9.0 
  25. * @param string $action The action being run. 
  26. */ 
  27. do_action( 'bp_get_request', $action );