The code given in the official Oxygen documentation as well as in all the tutorials on this site for registering custom conditions is supposed to be added as a Code Snippet.

There could be times when you want to instead have this code coming from a functionality plugin like My Custom Functionality.

This members-only tutorial provides information on how to register an Oxygen condition from a plugin.

If we take the Is Mobile condition as an example, you would need to change

if ( function_exists( 'oxygen_vsb_register_condition' ) ) {

	if ( ! class_exists( 'Mobile_Detect' ) ) {

		// Condition Name
		'Is Mobile',

		// Values: The array of pre-set values the user can choose from.
		// Set the custom key's value to true to allow users to input custom values.
			'options' => array( 'true', 'false' ),
			'custom' => false

		// Operators
		array( '==' ),
		// Callback Function: Name of function that will be used to handle the condition

		// Condition Category: Default ones are Archive, Author, Other, Post, User



This is a premium members-only content.

To view the rest of the content, please sign up for membership ($47/month or $399 one-time).

Already a member? Log in below or here.

Need help implementing a tutorial in your site or want to hire me for custom work?


Find the article helpful and wish to donate?



You need to be logged in to view and post comments.
Not a member yet? Join here.
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram
%d bloggers like this: