Created
October 29, 2013 19:35
-
-
Save hiranthi/7221115 to your computer and use it in GitHub Desktop.
This file contains 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 onx_reset_faceted_menus () | |
{ | |
if ( isset( $_GET['reset'] ) && class_exists( 'Shopp' ) ) | |
{ | |
// the part of the Shopp Object that holds the facet filtering info, make it empty | |
ShoppStorefront()->browsing = array(); | |
// get the current url | |
$url = explode( '?', onx_full_url() ); | |
// redirect to the current url, without the extra vars | |
wp_redirect( $url[0] ); exit; | |
} | |
} // end onx_reset_faceted_menus | |
add_action('wp','onx_reset_faceted_menus',1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment