File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
classes/Visualizer/Module Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ public function enqueueScripts() {
90
90
public function renderChart ( $ atts ) {
91
91
$ atts = shortcode_atts ( array (
92
92
'id ' => false , // chart id
93
+ 'class ' => false , // chart class
93
94
'series ' => false , // series filter hook
94
95
'data ' => false , // data filter hook
95
96
), $ atts );
@@ -100,6 +101,8 @@ public function renderChart( $atts ) {
100
101
}
101
102
102
103
$ id = 'visualizer- ' . $ atts ['id ' ];
104
+ $ class = !empty ( $ atts ['class ' ] ) ? ' class=" ' . $ atts ['class ' ] . '" ' : '' ;
105
+
103
106
$ type = get_post_meta ( $ chart ->ID , Visualizer_Plugin::CF_CHART_TYPE , true );
104
107
105
108
// faetch and update settings
@@ -133,7 +136,7 @@ public function renderChart( $atts ) {
133
136
wp_localize_script ( 'visualizer-render ' , 'visualizer ' , array ( 'charts ' => $ this ->_charts ) );
134
137
135
138
// return placeholder div
136
- return '<div id=" ' . $ id . '"></div> ' ;
139
+ return '<div id=" ' . $ id . '" ' . $ class . ' ></div> ' ;
137
140
}
138
141
139
142
}
You can’t perform that action at this time.
0 commit comments