Replace deprecated functions

This commit is contained in:
Brian Miyaji
2014-03-28 16:53:15 +11:00
parent 461b4f394c
commit 1add35a47f
58 changed files with 348 additions and 471 deletions

View File

@@ -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, '&mdash;' ) . '</td>';
$output .= '<td class="data-' . $key . '">' . sp_array_value( $row, $key, '&mdash;' ) . '</td>';
endforeach;
$output .= '</tr>';