Skip to content

Instantly share code, notes, and snippets.

@musamamasood
Last active February 22, 2017 01:28
Show Gist options
  • Save musamamasood/6c88040b569c958fb303e08ee887c974 to your computer and use it in GitHub Desktop.
Save musamamasood/6c88040b569c958fb303e08ee887c974 to your computer and use it in GitHub Desktop.
Refresh Page URL
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