bbp_get_ajax_url

Return the URL to use for theme-side bbPress AJAX requests.

Description

(string) bbp_get_ajax_url(); 

Returns (string)


Usage

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

Defined (1)

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

/includes/common/ajax.php  
  1. function bbp_get_ajax_url() { 
  2. global $wp; 
  3.  
  4. $base_url = home_url( trailingslashit( $wp->request ), ( is_ssl() ? 'https' : 'http' ) ); 
  5. $ajaxurl = add_query_arg( array( 'bbp-ajax' => 'true' ), $base_url ); 
  6.  
  7. return apply_filters( 'bbp_get_ajax_url', $ajaxurl );