You appear to be a bot. Output may be restricted
Description
Get the current page URL
Usage
$string = edd_get_current_page_url( $nocache );
Parameters
- $nocache
- ( bool ) optional – If we should bust cache on the returned URL
Returns
string $page_url Current page URL
Source
File name: easy-digital-downloads/includes/misc-functions.php
Lines:
1 to 32 of 32
function edd_get_current_page_url( $nocache = false ) { global $wp; if( get_option( 'permalink_structure' ) ) { $base = trailingslashit( home_url( $wp->request ) ); } else { $base = add_query_arg( $wp->query_string, '', trailingslashit( home_url( $wp->request ) ) ); $base = remove_query_arg( array( 'post_type', 'name' ), $base ); } $scheme = is_ssl() ? 'https' : 'http'; $uri = set_url_scheme( $base, $scheme ); if ( is_front_page() ) { $uri = home_url( '/' ); } elseif ( edd_is_checkout() ) { $uri = edd_get_checkout_uri(); } $uri = apply_filters( 'edd_get_current_page_url', $uri ); if ( $nocache ) { $uri = edd_add_cache_busting( $uri ); } return $uri; }