$a[1]; } ); foreach( $buffer as $k => $slugs ) { if ( empty( $slugs[1] ) && ! empty( $cp_options['hide_empty_value'] ) ) { $hidden++; $hidden_empty = 1; continue; } $count++; if ( $count > $chart_max_plugins ) { $hidden++; $hidden_max_plugins = 1; continue; } // Check whether we should use the name or the slug if ( $cp_options['display_name'] == 'slug' ) { $n = $slugs[0]; } else { $n = $slugs[2]; } // Truncate and sanitise the name if ( strlen( $n ) > $cp_options['truncate_name'] ) { $n = mb_substr( $n, 0, $cp_options['truncate_name'] , 'utf-8') .'...'; } // Mark theme as such if ( $slugs[3] == 'theme' ) { $label[] = "{$n} ($theme)"; } else { $label[] = $n; } $data .= "{$slugs[1]},"; $total_time += $slugs[1]; } $data = rtrim( $data, ',' ); $count = count( $label ) - 1; ?>