diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php
index c7d10fca21..1c955e71db 100644
--- a/src/wp-admin/includes/class-wp-posts-list-table.php
+++ b/src/wp-admin/includes/class-wp-posts-list-table.php
@@ -640,12 +640,24 @@ class WP_Posts_List_Table extends WP_List_Table {
 
 		$mode_class = esc_attr( 'table-view-' . $mode );
 
-		return array(
-			'widefat',
-			'fixed',
-			'striped',
-			$mode_class,
-			is_post_type_hierarchical( $this->screen->post_type ) ? 'pages' : 'posts',
+		/**
+		 * Filters the CSS classes applied to the posts list table.
+		 *
+		 * @since 6.8.0
+		 *
+		 * @param string[] $classes   An array of CSS classes for the posts list table.
+		 * @param string   $post_type The post type slug.
+		 */
+		return apply_filters(
+			'post_list_table_classes',
+			array(
+				'widefat',
+				'fixed',
+				'striped',
+				$mode_class,
+				is_post_type_hierarchical( $this->screen->post_type ) ? 'pages' : 'posts',
+			),
+			$this->screen->post_type
 		);
 	}
 
diff --git a/tests/phpunit/tests/admin/wpPostsListTable.php b/tests/phpunit/tests/admin/wpPostsListTable.php
index 9d2482a034..c73370b561 100644
--- a/tests/phpunit/tests/admin/wpPostsListTable.php
+++ b/tests/phpunit/tests/admin/wpPostsListTable.php
@@ -309,6 +309,74 @@ class Tests_Admin_wpPostsListTable extends WP_UnitTestCase {
 		$this->assertStringNotContainsString( 'id="delete_all"', $output );
 	}
 
+	/**
+	 * @ticket 58824
+	 *
+	 * @covers WP_Posts_List_Table::get_table_classes
+	 */
+	public function test_get_table_classes_returns_default_classes() {
+		$method = new ReflectionMethod( $this->table, 'get_table_classes' );
+		$method->setAccessible( true );
+
+		$classes = $method->invoke( $this->table );
+
+		$this->assertContains( 'widefat', $classes );
+		$this->assertContains( 'fixed', $classes );
+		$this->assertContains( 'striped', $classes );
+		$this->assertContains( 'pages', $classes );
+	}
+
+	/**
+	 * @ticket 58824
+	 *
+	 * @covers WP_Posts_List_Table::get_table_classes
+	 */
+	public function test_get_table_classes_filter_modifies_classes() {
+		add_filter(
+			'post_list_table_classes',
+			static function ( $classes ) {
+				$classes[] = 'my-custom-class';
+				return $classes;
+			}
+		);
+
+		$method = new ReflectionMethod( $this->table, 'get_table_classes' );
+		$method->setAccessible( true );
+
+		$classes = $method->invoke( $this->table );
+
+		remove_all_filters( 'post_list_table_classes' );
+
+		$this->assertContains( 'my-custom-class', $classes );
+	}
+
+	/**
+	 * @ticket 58824
+	 *
+	 * @covers WP_Posts_List_Table::get_table_classes
+	 */
+	public function test_get_table_classes_filter_receives_post_type() {
+		$received_post_type = null;
+
+		add_filter(
+			'post_list_table_classes',
+			static function ( $classes, $post_type ) use ( &$received_post_type ) {
+				$received_post_type = $post_type;
+				return $classes;
+			},
+			10,
+			2
+		);
+
+		$method = new ReflectionMethod( $this->table, 'get_table_classes' );
+		$method->setAccessible( true );
+		$method->invoke( $this->table );
+
+		remove_all_filters( 'post_list_table_classes' );
+
+		$this->assertSame( 'page', $received_post_type );
+	}
+
 	/**
 	 * @ticket 42066
 	 *
