Skip to content

Instantly share code, notes, and snippets.

@Spellhammer
Spellhammer / gist:2b4547c36c2e2d9a8e0fa9ec84c83cf7
Last active January 25, 2022 17:51
Post Type Condition For ACF Extended Post Types
if( function_exists('oxygen_vsb_register_condition') ) {
add_action('init', 'register_post_type_condition_acfe', 99);
function register_post_type_condition_acfe() {
$post_types = array_values(get_post_types(array('public'=>true)));
global $oxy_condition_operators;
@Spellhammer
Spellhammer / urlparamexistscondition
Last active August 15, 2022 10:30
Check for presence of URL parameter condition for Oxygen
if( function_exists('oxygen_vsb_register_condition') ) {
global $oxy_condition_operators;
// Condition to check if a URL parameter is present.
oxygen_vsb_register_condition('URL Param Exists', array('options'=>array(), 'custom'=>true), array('--'), 'oxy_url_param_exists_callback', 'Other');
function oxy_url_param_exists_callback($value, $operator) {
if( isset($_GET[$value]) && $_GET[$value] ) {
@Spellhammer
Spellhammer / accessurlcondition
Created April 28, 2020 15:01
"Access" URL Param Condition for Oxygen
if( function_exists('oxygen_vsb_register_condition') ) {
global $oxy_condition_operators;
// Condition to check if a URL parameter is present.
oxygen_vsb_register_condition('Access Code', array('options'=>array(), 'custom'=>true), $oxy_condition_operators['string'], 'oxy_access_code_callback', 'Other');
function oxy_access_code_callback($value, $operator) {
if( $operator == '==') {