Last active
February 22, 2017 01:28
-
-
Save musamamasood/6c88040b569c958fb303e08ee887c974 to your computer and use it in GitHub Desktop.
Refresh Page URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wishlist_refresh(){ | |
if ( isset($_GET['flush']) ){ | |
global $wp; | |
$current_url = home_url( remove_query_arg('flush', $wp->request) ); | |
if ( wp_redirect( $current_url ) ) { | |
exit; | |
} | |
} | |
} | |
add_action('init', 'wihslist_refresh'); | |
// Add ?refresh at end of each url in http://prntscr.com/ebt9ha | |
// http://stackoverflow.com/questions/17085821/php-cookie-set-in-second-refresh-page |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment