ap_current_page_url( array $args )
Description #
Return the current page url.
Parameters #
- $argsarray (Required) Arguments.
Source #
File: includes/functions.php
function ap_current_page_url( $args ) { $base = rtrim( get_permalink(), '/' ); if ( get_option( 'permalink_structure' ) !== '' ) { $link = $base . '/'; if ( ! empty( $args ) ) { foreach ( $args as $k => $s ) { $link .= $k . '/' . $s . '/'; } } } else { $link = add_query_arg( $args, $base ); } return $link; }
Expand full source code Collapse full source code View on GitHub: includes/functions.php:638
Add your comment