'; $html .= '

' . esc_html__( 'Content Bank has replaced the old generation history', 'ai-product-tools' ) . '

'; $html .= '

' . esc_html__( 'The Content History page is now Content Bank, with three tabs: Changes, To review and Drafts. Every AI apply writes a snapshot on every plan (as long as Content History capture is left on in settings): Changes keeps the pinned original value plus a configured number of intermediate snapshots, with older intermediate snapshots pruned.', 'ai-product-tools' ) . '

'; $html .= '

' . esc_html__( 'The old per-generator Description and SEO Meta history has been retired. Records stored in those history tables were not carried into Content Bank and cannot be recovered. Business plan adds one-click restore for the snapshots Content Bank keeps.', 'ai-product-tools' ) . '

'; $html .= '

' . esc_html__( 'Open Content Bank', '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_options' ) ) { 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. * * Keeps the notice contextual per WordPress.org Guideline 11, mirroring * the page check used by MigrationNotices. * * @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. * * Same shape as FsManager::enqueueDismissScript(): the core `is-dismissible` * button hides the notice, this listener also persists the dismissal. * * @return string */ private static function get_dismiss_script(): string { return ''; } }