# Control Settings

Elementor Core Advanced

Control settings allow developers to set defaults for controls such as the label, description, whether or not to show a separator, hide the label, etc.

# Available Settings

Each control has default settings that determine the structure and design of the control in the panel. These default setting are defined in the $_base_settings property. Following, is the list of default settings which all controls have in common:

Name Type Default Description
label string The label that appears above of the field
description string The description that appears below the field
show_label bool true Whether or not to display the label
label_block bool false Whether or not to display the label in a separate line
separator string default Set the position of the control separator. Available values are default, before, after and none. default will position the separator depending on the control type. before / after will position the separator before/after the control. none will hide the separator.

Each control can override the default settings and add new custom settings.

# Settings Method

If a control uses the default settings, you don't need to add it to your class. If you would like to change the default settings or add new ones, use the get_default_settings() method. This method should return an array:

class Elementor_Test_Control extends \Elementor\Base_Control {

	protected function get_default_settings() {

		return [
			'label_block' => true,
			'separator' => 'after',
			'new_settings_value' => '',
			'new_multiple_values' => [],
		];

	}

}
1
2
3
4
5
6
7
8
9
10
11
12
13
14

Later on, you can utilize those settings when generating a control template.

# Dynamic Tags

You can also support dynamic tags in your controls. To use this feature in your controls, add the dynamic setting:









 
 
 
 






class Elementor_Test_Control extends \Elementor\Base_Control {

	protected function get_default_settings() {

		return [
			'show_label' => true,
			'label_block' => true,
			'separator' => 'after',
			'dynamic' => [
				'active' => true,
				'categories' => [ \Elementor\Modules\DynamicTags\Module::TEXT_CATEGORY ],
			],
		];

	}

}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17