PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.3.0
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.3.0
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | classes/Visualizer/Module/Frontend.php +29 -26 3.2.13.3.0 View file →
@@ -282,34 +282,8 @@
282 282 'data' => $data,
283 283 'library' => $library,
284 284 );
285 285
286 - wp_register_script(
287 - "visualizer-render-$library",
288 - VISUALIZER_ABSURL . 'js/render-facade.js',
289 - apply_filters( 'visualizer_assets_render', array( 'jquery', 'visualizer-customization' ), true ),
290 - Visualizer_Plugin::VERSION,
291 - true
292 - );
293 -
294 - wp_enqueue_script( "visualizer-render-$library" );
295 - wp_localize_script(
296 - "visualizer-render-$library",
297 - 'visualizer',
298 - array(
299 - 'charts' => $this->_charts,
300 - 'language' => $this->get_language(),
301 - 'map_api_key' => get_option( 'visualizer-map-api-key' ),
302 - 'rest_url' => version_compare( $wp_version, '4.7.0', '>=' ) ? rest_url( 'visualizer/v' . VISUALIZER_REST_VERSION . '/action/#id#/#type#/' ) : '',
303 - 'i10n' => array(
304 - 'copied' => __( 'Copied!', 'visualizer' ),
305 - ),
306 - 'page_type' => 'frontend',
307 - 'is_front' => true,
308 - )
309 - );
310 - wp_enqueue_style( 'visualizer-front' );
311 -
312 286 $actions_div = '';
313 287 $actions_visible = apply_filters( 'visualizer_pro_add_actions', isset( $settings['actions'] ) ? $settings['actions'] : array(), $atts['id'] );
314 288 if ( ! empty( $actions_visible ) ) {
315 289 $actions = $this->get_actions();
@@ -338,8 +312,37 @@
338 312 $actions_div .= '</div>';
339 313 }
340 314
341 315 $actions_div .= $css;
316 +
317 + foreach ( $this->_charts as $id => $attributes ) {
318 + $library = $attributes['library'];
319 + wp_register_script(
320 + "visualizer-render-$library",
321 + VISUALIZER_ABSURL . 'js/render-facade.js',
322 + apply_filters( 'visualizer_assets_render', array( 'jquery', 'visualizer-customization' ), true ),
323 + Visualizer_Plugin::VERSION,
324 + true
325 + );
326 +
327 + wp_enqueue_script( "visualizer-render-$library" );
328 + wp_localize_script(
329 + "visualizer-render-$library",
330 + 'visualizer',
331 + array(
332 + 'charts' => $this->_charts,
333 + 'language' => $this->get_language(),
334 + 'map_api_key' => get_option( 'visualizer-map-api-key' ),
335 + 'rest_url' => version_compare( $wp_version, '4.7.0', '>=' ) ? rest_url( 'visualizer/v' . VISUALIZER_REST_VERSION . '/action/#id#/#type#/' ) : '',
336 + 'i10n' => array(
337 + 'copied' => __( 'Copied!', 'visualizer' ),
338 + ),
339 + 'page_type' => 'frontend',
340 + 'is_front' => true,
341 + )
342 + );
343 + wp_enqueue_style( 'visualizer-front' );
344 + }
342 345
343 346 // return placeholder div
344 347 return $actions_div . '<div id="' . $id . '"' . $class . '></div>';
345 348 }