Created
December 7, 2012 16:02
-
-
Save bolstad/4234224 to your computer and use it in GitHub Desktop.
extend wpv-if shortcode
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
add_filter('wpv-extra-condition-filters', 'wpv_add_time_functions'); | |
function wpv_add_time_functions($value) | |
{ | |
// is_get_param($_GET['parameter']) - returns true if parameter is set | |
if (preg_match('/is_get_param\((.*)\)/',$value,$matches)) | |
{ | |
$uriparameter = $matches[1]; | |
if (isset ($_GET[$uriparameter])) | |
return '1=1'; | |
} | |
return $value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment