wp/wp-admin/includes/list-table.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
--- a/wp/wp-admin/includes/list-table.php	Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-admin/includes/list-table.php	Tue Sep 27 16:37:53 2022 +0200
@@ -15,11 +15,11 @@
  *
  * @global string $hook_suffix
  *
- * @param string $class The type of the list table, which is the class name.
- * @param array  $args  Optional. Arguments to pass to the class. Accepts 'screen'.
+ * @param string $class_name The type of the list table, which is the class name.
+ * @param array  $args       Optional. Arguments to pass to the class. Accepts 'screen'.
  * @return WP_List_Table|false List table object on success, false if the class does not exist.
  */
-function _get_list_table( $class, $args = array() ) {
+function _get_list_table( $class_name, $args = array() ) {
 	$core_classes = array(
 		// Site Admin.
 		'WP_Posts_List_Table'                         => 'posts',
@@ -45,8 +45,8 @@
 		'WP_Privacy_Data_Removal_Requests_List_Table' => 'privacy-data-removal-requests',
 	);
 
-	if ( isset( $core_classes[ $class ] ) ) {
-		foreach ( (array) $core_classes[ $class ] as $required ) {
+	if ( isset( $core_classes[ $class_name ] ) ) {
+		foreach ( (array) $core_classes[ $class_name ] as $required ) {
 			require_once ABSPATH . 'wp-admin/includes/class-wp-' . $required . '-list-table.php';
 		}
 
@@ -58,7 +58,7 @@
 			$args['screen'] = null;
 		}
 
-		return new $class( $args );
+		return new $class_name( $args );
 	}
 
 	return false;