This commit is contained in:
Krystie
2026-06-04 17:49:53 -07:00
2 changed files with 9 additions and 4 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

+9 -4
View File
@@ -20,11 +20,16 @@ class Beep_Plugin {
update_option('beep_giphy_key', 'xuxYxuIvzPqw5tPB4laa7sQO8dFtSlNS');
}
// Elementor widget
// Elementor widget — only load if Elementor is active
add_action('elementor/widgets/register', function ($widgets_manager) {
require_once BEEP_DIR . 'includes/class-elementor-widget.php';
$widgets_manager->register(new \Elementor\Beep_Elementor_Widget());
});
if (!class_exists('\Elementor\Widget_Base')) return;
$widget_file = BEEP_DIR . 'includes/class-elementor-widget.php';
if (!file_exists($widget_file)) return;
require_once $widget_file;
if (class_exists('\Elementor\Beep_Elementor_Widget')) {
$widgets_manager->register(new \Elementor\Beep_Elementor_Widget());
}
}, 5);
// Admin settings (Giphy API key only — full settings via Beep_Settings)
add_action('admin_menu', [__CLASS__, 'add_admin_menu']);