![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/walla3t.corals.io/wp-content/plugins/apper-core/includes/ |
<?php /* * @package AcmThemes Base * @author AcmeeDesign * @link https://acmeedesign.com * @since 1.0 */ if ( ! defined( 'ABSPATH' ) ) exit; class AcmThemes_Elementor_Widgets_base { private static $instance = null; public static function get_instance() { if ( ! self::$instance ) self::$instance = new self; return self::$instance; } public function init(){ add_action('elementor/frontend/after_register_scripts', array($this, 'enqueue_scripts')); add_action( 'elementor/widgets/register', array( $this, 'widgets_registered' ) ); add_action( 'elementor/elements/categories_registered', array( $this, 'add_apper_widgets_category' ), 1 ); } public function enqueue_scripts() { wp_enqueue_script( 'admin-scripts', ACMBASE_JS_DIR_URI . 'frontend.js', [ 'jquery' ], ACMBASE_VERSION, true ); } public function widgets_registered() { // We check if the Elementor plugin has been installed / activated. if(defined('ELEMENTOR_PATH') && class_exists('Elementor\Widget_Base')){ foreach (glob(plugin_dir_path(__FILE__) . 'elementor-widgets/acm-*.php') as $template_file) { if ( $template_file && is_readable( $template_file ) ) { include_once $template_file; } } } } public function add_apper_widgets_category( $elements_manager ) { $elements_manager->add_category( 'apper', [ 'title' => esc_html__( 'Apper', 'apper' ), 'icon' => 'fa fa-plug', ] ); } } AcmThemes_Elementor_Widgets_base::get_instance()->init();