prefix . 'schema_ai_schemas' ); $schema_ai_deprecated_types = class_exists( 'Schema_AI_Entity_Settings' ) ? Schema_AI_Entity_Settings::$deprecated_types : array(); $schema_ai_deprecated_rows = array(); if ( ! empty( $schema_ai_deprecated_types ) ) { $schema_ai_placeholders = implode( ',', array_fill( 0, count( $schema_ai_deprecated_types ), '%s' ) ); // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare -- $schema_ai_table sanitized via esc_sql(); $schema_ai_placeholders built from count; spread operator passes correct values. $schema_ai_deprecated_rows = $wpdb->get_results( $wpdb->prepare( "SELECT s.id, s.post_id, s.schema_type, s.validation_status, s.updated_at, p.post_title, p.post_status, p.post_type FROM {$schema_ai_table} s LEFT JOIN {$wpdb->posts} p ON p.ID = s.post_id WHERE s.schema_type IN ({$schema_ai_placeholders}) ORDER BY s.updated_at DESC LIMIT 200", ...$schema_ai_deprecated_types ) ); // phpcs:enable } ?>

post_id ? get_edit_post_link( (int) $schema_ai_row->post_id ) : ''; $schema_ai_post_label = ! empty( $schema_ai_row->post_title ) ? $schema_ai_row->post_title /* translators: %d: post ID */ : sprintf( __( 'Post #%d', 'ai-schema-gen' ), (int) $schema_ai_row->post_id ); $schema_ai_pt_obj = ! empty( $schema_ai_row->post_type ) ? get_post_type_object( $schema_ai_row->post_type ) : null; $schema_ai_pt_label = $schema_ai_pt_obj ? $schema_ai_pt_obj->labels->singular_name : $schema_ai_row->post_type; $schema_ai_time_ago = human_time_diff( strtotime( $schema_ai_row->updated_at ), current_time( 'timestamp' ) ); ?>
post_status ) : ?>
· #post_id; ?>
schema_type ); ?> post_status ?: '—' ) ); ?>