Filter
rpress_ajax_url
On this page
Filters the URL used for RestroPress AJAX requests.
The URL is admin-ajax.php with its scheme adjusted to match the current page's HTTP or HTTPS scheme. Filter it to point AJAX calls at a different endpoint, for example on a cached or proxied setup.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$ajax_url | string | The admin-ajax.php URL. |
Return value#
string. The AJAX URL.
Example#
function my_rpress_ajax_url( $ajax_url ) {
return add_query_arg( 'lang', 'en', $ajax_url );
}
add_filter( 'rpress_ajax_url', 'my_rpress_ajax_url' );
Source#
Applied in:
includes/rp-ajax-functions.php(line 111), inrpress_get_ajax_url()
See also#
Was this page helpful?
