load_settings(); $this->plugin_loaded(); } function plugin_loaded() { // foreach (glob(ADMINZ_DIR . '/includes/shortcodes/elementor-*.php') as $filename) { require_once $filename; } } function load_settings() { $this->settings = get_option($this->option_name, []); } function add_admin_nav($nav) { $nav[$this->id] = $this->name; return $nav; } function register_settings() { register_setting($this->id, $this->option_name); // add section add_settings_section( 'adminz_elementor_elements', 'Elementor', function () { }, $this->id ); // field add_settings_field( wp_rand(), 'Widgets', function () { echo 'Some widgets from Elementor has been added. Open page builder to show'; }, $this->id, 'adminz_elementor_elements' ); } }