Skip to content

Commit 196978a

Browse files
add classes to each box that identifies the libraries this chart type supports
1 parent b980484 commit 196978a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

classes/Visualizer/Render/Page/Types.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ protected function _toHTML() {
5454
protected function _renderContent() {
5555
echo '<div id="type-picker">';
5656
foreach ( $this->types as $type => $array ) {
57-
echo '<div class="type-box type-box-', $type, '">';
57+
// add classes to each box that identifies the libraries this chart type supports.
58+
$lib_classes = '';
59+
foreach ( $array['supports'] as $lib ) {
60+
$lib_classes .= ' type-lib-' . str_replace( ' ', '', $lib );
61+
}
62+
echo '<div class="type-box type-box-', $type, $lib_classes, '">';
5863
if ( ! $array['enabled'] ) {
5964
echo "<a class='pro-upsell' href='" . Visualizer_Plugin::PRO_TEASER_URL . "' target='_blank'>";
6065
echo "<span class='visualizder-pro-label'>" . __( 'PREMIUM', 'visualizer' ) . '</span>';

0 commit comments

Comments
 (0)