if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
* Elementor WordPress widget control.
* A base control for creating WordPress widget control. Displays native
* WordPress widgets. This a private control for internal use.
class Control_WP_Widget extends Base_Data_Control {
* Get WordPress widget control type.
* Retrieve the control type, in this case `wp_widget`.
* @return string Control type.
public function get_type() {
* Get WordPress widget control default values.
* Retrieve the default value of the WordPress widget control. Used to return the
* default values while initializing the WordPress widget control.
* @return array Control default value.
public function get_default_value() {
* Render WordPress widget control output in the editor.
* Used to generate the control HTML in the editor using Underscore JS
* template. The variables for the class are available using `data` JS
public function content_template() {
<form action="" method="post">
<div class="wp-widget-form-loading">Loading..</div>