# Condition Data

Elementor Pro Advanced

Every condition has basic information such as the condition unique ID and the condition label. This data is used in the code and displayed to the user in the editor.

# Data Methods

Condition data needs to be "returned" by certain methods. Those methods are simple:

class Elementor_Test_Condition extends \ElementorPro\Modules\ThemeBuilder\Conditions\Condition_Base {

	public function get_name(): string {
		return 'condition_name';
	}

	public function get_label(): string {
		return esc_html__( 'My Condition Name', 'textdomain' );
	}

}
1
2
3
4
5
6
7
8
9
10
11
  • Condition Type – The get_type() method returns the condition name (id) that will be used in the code.

  • Condition Name – The get_name() method returns the condition label that will be displayed to the user.