Skip to content

Commit

Permalink
Add new filter for container attributes #922
Browse files Browse the repository at this point in the history
  • Loading branch information
girishpanchal30 committed Aug 16, 2022
1 parent 5425d59 commit 5bbb35d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion classes/Visualizer/Module/Frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ public function renderChart( $atts ) {
$attributes['data-lazy-limit'] = $atts['lazy'];
}

$attributes = apply_filters( 'visualizer_container_attributes', $attributes, $chart->ID );

$chart = apply_filters( 'visualizer_schedule_refresh_chart', $chart, $chart->ID, false );

// Get and update settings.
Expand Down Expand Up @@ -492,7 +494,7 @@ private function getHtmlAttributes( $attributes ) {
if ( ! $attributes ) {
return $string;
}

$attributes = apply_filters( 'visualizer_schema_show_errors', $attributes );
foreach ( $attributes as $name => $value ) {
$string .= sprintf( ' %s="%s"', esc_attr( $name ), esc_attr( $value ) );
}
Expand Down

0 comments on commit 5bbb35d

Please sign in to comment.