WordPress.org

Make WordPress Core

Ticket #29019: check_for_class.1.29019.diff

File check_for_class.1.29019.diff, 772 bytes (added by dwigton, 6 years ago)

The previous file did not use tab indenting and missed a curly brace

  • src/wp-admin/includes/list-table.php

    diff --git src/wp-admin/includes/list-table.php src/wp-admin/includes/list-table.php
    index 04b552f..7afcea5 100644
    function _get_list_table( $class, $args = array() ) { 
    3838        );
    3939
    4040        if ( isset( $core_classes[ $class ] ) ) {
    41                 foreach ( (array) $core_classes[ $class ] as $required )
    42                         require_once( ABSPATH . 'wp-admin/includes/class-wp-' . $required . '-list-table.php' );
     41                foreach ( (array) $core_classes[ $class ] as $required ) {
     42                        if ( ! class_exists( $class ) ) {
     43                                require( ABSPATH . 'wp-admin/includes/class-wp-' . $required . '-list-table.php' );
     44                        }
     45                }
    4346
    4447                if ( isset( $args['screen'] ) )
    4548                        $args['screen'] = convert_to_screen( $args['screen'] );