Skip to content

Commit c1cec69

Browse files
add filter
1 parent b7fbfe0 commit c1cec69

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

classes/Visualizer/Module/Frontend.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public function __construct( Visualizer_Plugin $plugin ) {
5454
parent::__construct( $plugin );
5555

5656
$this->_addAction( 'wp_enqueue_scripts', 'enqueueScripts' );
57+
$this->_addFilter( 'visualizer_get_language', 'getLanguage' );
5758
$this->_addShortcode( 'visualizer', 'renderChart' );
5859

5960
// add do_shortocde hook for widget_text filter
@@ -69,6 +70,14 @@ public function __construct( Visualizer_Plugin $plugin ) {
6970
add_action( 'rest_api_init', array( $this, 'endpoint_register' ) );
7071
}
7172

73+
/**
74+
* Returns the language/locale.
75+
*/
76+
function getLanguage( $dummy, $only_language ) {
77+
return $this->get_language();
78+
}
79+
80+
7281
/**
7382
* Registers the endpoints
7483
*/

0 commit comments

Comments
 (0)