Description
This function returns the url of the current page.
The function does not echo output. Since it returns a string, this can be used for comparisons.
Parameters
$slash
(boolean)(optional) Add trailing slash to the current URL (Default: true)
$getq
(boolean)(optional) Get the query string (if one exists) (Default: true)
Return Values
(string) The URL of the current page.
Examples
Compare the current page to see if we are on the login page (using wpmem_login_url()):
Changelog
- Introduced in version 3.1.1
- Added check for query string in 3.1.7
Source
wpmem_current_url() is located in /includes/api/api.php.