Add player performance times to events

This commit is contained in:
Brian Miyaji
2016-09-01 13:24:58 +10:00
parent 8277cdf98d
commit c693b8a393
7 changed files with 129 additions and 14 deletions

View File

@@ -106,7 +106,12 @@ class SportsPress_Icons {
if ( null !== $icon && in_array( $icon, $this->icons ) ) {
$title = get_the_title( $id );
$color = get_post_meta( $id, 'sp_color', true );
$icons = str_repeat( '<i class="sp-icon-' . $icon . '" title="' . $title . '" style="color:' . $color . '"></i>' . ' ', $value );
preg_match( '#\((.*?)\)#', $value, $match );
if ( ! empty( $match ) && isset( $match[1] ) ) {
$icons = '<i class="sp-icon-' . $icon . '" title="' . $title . '" style="color:' . $color . '"></i> ' . $match[1] . '<br>';
} else {
$icons = str_repeat( '<i class="sp-icon-' . $icon . '" title="' . $title . '" style="color:' . $color . '"></i> ', intval( $value ) );
}
}
return $icons;
}