Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Get current URL (general function WP is lacking)
- *
- * @return bool
- * @since 1.9.6
- */
- if (!function_exists('get_current_url')) {
- function get_current_url() {
- $url = 'http://';
- if (isset($_SERVER['HTTPS']) && 'off' != $_SERVER['HTTPS'] && 0 != $_SERVER['HTTPS'])
- $url = 'https://';
- $url .= $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
- return $url;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement