Skip to content

Commit b8532ca

Browse files
committed
Fixed logger flag.
1 parent 1077657 commit b8532ca

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

classes/Visualizer/Module/Admin.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public function __construct( Visualizer_Plugin $plugin ) {
5959
$this->_addFilter( 'media_view_strings', 'setupMediaViewStrings' );
6060
$this->_addFilter( 'plugin_action_links', 'getPluginActionLinks', 10, 2 );
6161
$this->_addFilter( 'plugin_row_meta', 'getPluginMetaLinks', 10, 2 );
62-
$this->_addFilter( 'visualizer_logger_flag', 'get_logger_flag', 10, 1 );
6362
$this->_addAjaxAction( Visualizer_Plugin::ACTION_TRACK, 'visualizer_enable_track' );
6463
}
6564

@@ -77,17 +76,6 @@ public function visualizer_enable_track() {
7776
wp_send_json_success( array( 'status' => $status ) );
7877
}
7978

80-
/**
81-
* Either the tracking is active or not.
82-
*
83-
* @return bool The flag status.
84-
*/
85-
public function get_logger_flag() {
86-
$flag = get_option( 'visualizer_logger_flag', 'no' );
87-
88-
return ( $flag === 'yes' );
89-
}
90-
9179
/**
9280
* Enqueues media scripts and styles.
9381
*

classes/Visualizer/Module/Setup.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ public function __construct( Visualizer_Plugin $plugin ) {
4444

4545
$this->_addAction( 'init', 'setupCustomPostTypes' );
4646
$this->_addAction( 'plugins_loaded', 'loadTextDomain' );
47+
$this->_addFilter( 'visualizer_logger_flag', 'get_logger_flag', 10, 1 );
48+
}
49+
50+
/**
51+
* Either the tracking is active or not.
52+
*
53+
* @return bool The flag status.
54+
*/
55+
public function get_logger_flag() {
56+
$flag = get_option( 'visualizer_logger_flag', 'no' );
57+
58+
return ( $flag === 'yes' );
4759
}
4860

4961
/**

0 commit comments

Comments
 (0)