'Asyntai AI Chatbot', 'slug' => 'asyntai-ai-chatbot', 'required' => false, ), ); $config = array( 'id' => 'business-ai', 'default_path' => '', 'menu' => 'tgmpa-install-plugins', 'parent_slug' => 'themes.php', 'capability' => 'edit_theme_options', 'has_notices' => true, 'dismissable' => true, 'dismiss_msg' => '', 'is_automatic' => false, 'message' => '', ); tgmpa( $plugins, $config ); } add_action( 'tgmpa_register', 'business_ai_register_required_plugins' ); /** * Only show TGMPA notices on themes page. */ function business_ai_tgmpa_admin_menu_args( $args ) { $screen = get_current_screen(); if ( ! $screen || $screen->id !== 'themes' ) { $args['has_notices'] = false; } return $args; } add_filter( 'tgmpa_admin_menu_args', 'business_ai_tgmpa_admin_menu_args' ); /** * Hide TGMPA notice on non-theme pages. */ function business_ai_hide_tgmpa_notice() { $screen = get_current_screen(); if ( $screen && $screen->id !== 'themes' ) { remove_action( 'admin_notices', array( TGM_Plugin_Activation::get_instance(), 'notices' ) ); } } add_action( 'admin_head', 'business_ai_hide_tgmpa_notice' );