Skip to content

Commit 5bbb35d

Browse files
Add new filter for container attributes #922
1 parent 5425d59 commit 5bbb35d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

classes/Visualizer/Module/Frontend.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,8 @@ public function renderChart( $atts ) {
341341
$attributes['data-lazy-limit'] = $atts['lazy'];
342342
}
343343

344+
$attributes = apply_filters( 'visualizer_container_attributes', $attributes, $chart->ID );
345+
344346
$chart = apply_filters( 'visualizer_schedule_refresh_chart', $chart, $chart->ID, false );
345347

346348
// Get and update settings.
@@ -492,7 +494,7 @@ private function getHtmlAttributes( $attributes ) {
492494
if ( ! $attributes ) {
493495
return $string;
494496
}
495-
497+
$attributes = apply_filters( 'visualizer_schema_show_errors', $attributes );
496498
foreach ( $attributes as $name => $value ) {
497499
$string .= sprintf( ' %s="%s"', esc_attr( $name ), esc_attr( $value ) );
498500
}

0 commit comments

Comments
 (0)