Skip to content
Docs
Get RestroPress

Filter

rpress_get_current_page_url

Updated
On this page

Filters the URL of the current page returned by rpress_get_current_page_url().

The URL is built from the request. On the front page it is the home URL and on the checkout page it is the checkout URI. The filter runs before any cache-busting query argument is added.

Parameters#

ParameterTypeDescription
$uristringThe current page URL.

Return value#

string. The URL.

Example#

function my_current_page_url( $uri ) {
	return remove_query_arg( 'utm_source', $uri );
}
add_filter( 'rpress_get_current_page_url', 'my_current_page_url' );

Source#

Applied in:

  • includes/rp-core-functions.php (line 2240), in rpress_get_current_page_url()
Was this page helpful?