if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
* Elementor text shadow control.
* A base control for creating text shadow control. Displays input fields to define
* the text shadow including the horizontal shadow, vertical shadow, shadow blur and
class Group_Control_Text_Shadow extends Group_Control_Base {
* Holds all the text shadow control fields.
* @var array Text shadow control fields.
protected static $fields;
* Get text shadow control type.
* Retrieve the control type, in this case `text-shadow`.
* @return string Control type.
public static function get_type() {
* Initialize text shadow control fields.
* @return array Control fields.
protected function init_fields() {
$controls['text_shadow'] = [
'label' => esc_html__( 'Text Shadow', 'elementor' ),
'type' => Controls_Manager::TEXT_SHADOW,
'{{SELECTOR}}' => 'text-shadow: {{HORIZONTAL}}px {{VERTICAL}}px {{BLUR}}px {{COLOR}};',
* Retrieve the default options of the text shadow control. Used to return the
* default options while initializing the text shadow control.
* @return array Default text shadow control options.
protected function get_default_options() {
'starter_title' => esc_html__( 'Text Shadow', 'elementor' ),
'starter_name' => 'text_shadow_type',
'starter_value' => 'yes',