'; $html .= '

' . esc_html__( 'AI Product Tools now runs every generator in Content Template Mode, which keeps your product content stable and consistent. We recommend staying in it. Your custom prompts are saved: if you are an advanced user who works with prompts, you can switch to Custom Prompt Mode in Settings.', 'ai-product-tools' ) . '

'; $html .= '

' . esc_html__( 'Open Settings', 'ai-product-tools' ) . '

'; $html .= ''; $html .= self::get_dismiss_script(); return $html; } /** * AJAX handler persisting the per-user dismissal. * * @return void */ public static function handle_dismiss(): void { check_ajax_referer( self::DISMISS_ACTION, 'nonce' ); if ( ! current_user_can( 'manage_aipt_settings' ) ) { wp_die( -1 ); } update_user_meta( get_current_user_id(), self::DISMISS_META_KEY, '1' ); wp_die( '1' ); } /** * Whether the current admin screen belongs to this plugin. Mirrors * {@see \AIPT\Admin\Notification\LegacyHistoryReleaseNotice::is_plugin_page()}. * * @return bool */ private static function is_plugin_page(): bool { if ( ! is_admin() ) { return false; } $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; if ( '' === $page ) { return false; } if ( 'ai-product-tools' === $page ) { return true; } return 0 === strpos( $page, 'aipt-' ); } /** * Inline script wiring the core dismiss button to the AJAX handler. * Mirrors {@see \AIPT\Admin\Notification\LegacyHistoryReleaseNotice::get_dismiss_script()}. * * @return string */ private static function get_dismiss_script(): string { return ''; } }