start_controls_section(
'kng_rotating_animation_section',
[
'label' => KING_ADDONS_ELEMENTOR_ICON . esc_html__('Rotating Animation', 'king-addons'),
'tab' => Controls_Manager::TAB_ADVANCED
]
);
$element->add_control(
'kng_rotating_animation_switch',
[
'label' => esc_html__('Enable Rotating Animation', 'king-addons'),
'type' => Controls_Manager::SWITCHER,
'prefix_class' => 'kng-rotating-animation-',
'frontend_available' => true
]
);
$element->add_control(
'kng_rotating_animation_duration',
[
'label' => esc_html__('Duration of single spin', 'king-addons') . ' (ms)',
'type' => Controls_Manager::NUMBER,
'frontend_available' => true,
'min' => 0,
'step' => 1,
'default' => 8000,
'condition' => [
'kng_rotating_animation_switch!' => ''
]
]
);
$element->add_control(
'kng_rotating_animation_delay',
[
'label' => esc_html__('Animation delay', 'king-addons') . ' (ms)',
'type' => Controls_Manager::NUMBER,
'frontend_available' => true,
'min' => 0,
'step' => 1,
'default' => 0,
'condition' => [
'kng_rotating_animation_switch!' => ''
]
]
);
$element->end_controls_section();
}
/**
* Renders the inline CSS for the rotating animation if enabled.
* Hooked into 'elementor/frontend/before_render'.
* Prints a ',
esc_attr($element_id), // %1$s: Sanitized ID for the