The URL Condition for Oxygen CodeBitt adds a new Oxygen Condition under the “Other” category to hide/show content based on the current URL.
$value
(string) The text that you would like to compare against the current URL.
$operator
(operator) Select the operator to determine how to compare the $value to the current URL.
Options:
==
: Looks for an exact match between the current URL and the $value!=
: Looks for anything but an exact match between the current URL and the $valuecontains
: Looks for the $value anywhere inside the current URLdoes not contain
: Looks for the $value to not be within the current URL. <?php
if (function_exists('oxygen_vsb_register_condition')) {
global $oxy_condition_operators;
oxygen_vsb_register_condition('URL', array('options' => array(), 'custom' => true), $oxy_condition_operators['string'], 'bitt_oxygen_url_callback', 'Other');
function bitt_oxygen_url_callback($value, $operator)
{
$url = $_SERVER['REQUEST_URI'];
return oxy_condition_eval_string($url, $value, $operator);
}
}