Created
February 18, 2021 09:16
-
-
Save rohit-ghoghari/51eb38a4f497dc963440d317da2647d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Used Code :'wc-custom-post-widget.php'. | |
*/ | |
class Elementor_Repeter_Widgets { | |
protected static $instance = null; | |
public static function get_instance() { | |
if ( ! isset( static::$instance ) ) { | |
static::$instance = new static; | |
} | |
return static::$instance; | |
} | |
protected function __construct() { | |
require_once('wc-widget.php'); | |
add_action( 'elementor/widgets/widgets_registered', [ $this, 'register_widgets' ] ); | |
} | |
public function register_widgets() { | |
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Elementor\Elementor_Repeter_Widget() ); | |
} | |
} | |
add_action( 'init', 'elementor_repeter_widget_callback' ); | |
function elementor_repeter_widget_callback() { | |
Elementor_Repeter_Widgets::get_instance(); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment