Logo
Logo

Element Display Conditions API

This documentation is intended for developers who wish to build extensions for Breakdance.

End-users who wish to create a custom Element Display Condition with PHP are advised to use the Custom PHP condition built-in to Breakdance.

Breakdance provides an Element Display Conditions API to add additional Element Display Conditions to the Conditions Chooser.

Element Display Conditions API documentation is available on GitHub.

Conditions have:

  • Labels (User Logged In Status, User Role, and User Registration Date in the below example)
  • Operands (is, is one of, and is after in the below example)
  • Values (logged in, edd_subscriber/subscriber, and 2022-09-01 in the below example)

When an element has Element Display Conditions, the element will be shown when the callback for the condition returns true, and hidden when the callback for the condition returns false.