To address #339
Remove array control on metrics data and add an autoconversion of PHP Object in PHP array. For json request, i use the variable instead of label in metrics. The variable names are lower case, without accent, without space (more stable than a label in a site).
This commit is contained in:
@@ -96,7 +96,7 @@ class SP_Player extends SP_Custom_Post {
|
||||
$metric = sp_array_value( $metrics, $key, null );
|
||||
if ( $metric == null )
|
||||
continue;
|
||||
$data[ $value ] = sp_array_value( $metrics, $key, ' ' );
|
||||
$data[ $key ] = sp_array_value( $metrics, $key, ' ' );
|
||||
endforeach;
|
||||
return $data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user