register(); $editor_ui->register(); if ( defined( 'WP_CLI' ) && WP_CLI ) { $cli = new AI_Translator_CLI( $settings, $translator ); $cli->register(); } Robotstxt_Updater::init( AI_TRANSLATOR_FILE ); } add_action( 'plugins_loaded', 'ai_translator_bootstrap' ); /** * Renders an admin notice when the WordPress AI plugin is not active. * * @since 1.0.0 * * @return void */ function ai_translator_dependency_notice() { if ( function_exists( 'wp_ai_client_prompt' ) ) { return; } if ( ! current_user_can( 'activate_plugins' ) ) { return; } $message = sprintf( /* translators: %s: WordPress AI plugin link. */ esc_html__( 'AI Translator (by ROBOTSTXT) requires the %s plugin to be active. Translation features will be disabled until it is installed and configured.', 'robotstxt-ai-translator' ), '' . esc_html__( 'WordPress AI', 'robotstxt-ai-translator' ) . '' ); printf( '
%s