Replace deprecated functions
This commit is contained in:
@@ -17,7 +17,7 @@ extract( $defaults, EXTR_SKIP );
|
||||
$output = '<div class="sp-table-wrapper">' .
|
||||
'<table class="sp-league-table sp-data-table' . ( $responsive ? ' sp-responsive-table' : '' ) . ( $sortable ? ' sp-sortable-table' : '' ) . '">' . '<thead>' . '<tr>';
|
||||
|
||||
$data = sportspress_get_league_table_data( $id );
|
||||
$data = sp_get_league_table_data( $id );
|
||||
|
||||
// The first row should be column labels
|
||||
$labels = $data[0];
|
||||
@@ -49,7 +49,7 @@ foreach( $data as $team_id => $row ):
|
||||
|
||||
if ( isset( $limit ) && $i >= $limit ) continue;
|
||||
|
||||
$name = sportspress_array_value( $row, 'name', null );
|
||||
$name = sp_array_value( $row, 'name', null );
|
||||
if ( ! $name ) continue;
|
||||
|
||||
$output .= '<tr class="' . ( $i % 2 == 0 ? 'odd' : 'even' ) . '">';
|
||||
@@ -71,7 +71,7 @@ foreach( $data as $team_id => $row ):
|
||||
if ( $key == 'name' )
|
||||
continue;
|
||||
if ( ! is_array( $columns ) || in_array( $key, $columns ) )
|
||||
$output .= '<td class="data-' . $key . '">' . sportspress_array_value( $row, $key, '—' ) . '</td>';
|
||||
$output .= '<td class="data-' . $key . '">' . sp_array_value( $row, $key, '—' ) . '</td>';
|
||||
endforeach;
|
||||
|
||||
$output .= '</tr>';
|
||||
|
||||
Reference in New Issue
Block a user