add_category( 'being', array( 'title' => esc_html__('Being Addons', 'being'), 'icon' => 'eicon-banner', ) ); } /** * widget_scripts * * Load required core files. * * @since 1.2.0 * @access public */ public function widget_scripts() { wp_register_script('be_editor_js',BEING_THEME_ROOT . '/inc/being-addon/assets/js/elementor-functions.js', ['jquery'], false, true); } /** * be_enqueue_editor_scripts */ function be_enqueue_editor_scripts() { wp_enqueue_style('nr-element-addons-editor', BE_ADDONS_URL . 'assets/css/editor.css', null, '1.0'); } /** * Force load editor script as a module * * @since 1.2.1 * * @param string $tag * @param string $handle * * @return string */ public function editor_scripts_as_a_module($tag, $handle) { if ('BEAddon-editor' === $handle) { $tag = str_replace('be_widget_list() as $widget_file_name) { require_once(BE_ELEMENTS_PATH . "/{$widget_file_name}.php"); } } public function be_widget_list() { return [ 'hero-banner', 'clients', 'experience', 'skills', 'education', 'services', 'testimonial', 'contact', 'portfolio-list', ]; } /** * Class constructor * * Register action hooks and filters * * @since 1.2.0 * @access public */ public function __construct() { // Register widget scripts add_action('elementor/frontend/after_register_scripts', [$this, 'widget_scripts']); // Register widgets add_action('elementor/widgets/register', [$this, 'register_widgets']); add_action('elementor/elements/categories_registered', [$this, 'BE_Core_elementor_category']); add_action('elementor/editor/after_enqueue_scripts', [$this, 'be_enqueue_editor_scripts']); } } // Instantiate Class BE_Core_Editor::instance();