@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * @return array Array of the options to use. |
59 | 59 | */ |
60 | 60 | public function frontend_tracking_options( ) { |
61 | - return array(); |
|
61 | + return array(); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | /** |
@@ -74,6 +74,6 @@ discard block |
||
74 | 74 | * @return string Javascript to output. |
75 | 75 | */ |
76 | 76 | public function frontend_output( ) { |
77 | - return "<!-- MonsterInsights Abstract Tracking class -->"; |
|
77 | + return "<!-- MonsterInsights Abstract Tracking class -->"; |
|
78 | 78 | } |
79 | 79 | } |
80 | 80 | \ No newline at end of file |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | } |
26 | 26 | |
27 | - public function add_report( $report = false ){ |
|
27 | + public function add_report( $report = false ) { |
|
28 | 28 | if ( empty( $report ) || ! is_object( $report ) ) { |
29 | 29 | return; |
30 | 30 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | } |
26 | 26 | |
27 | - public function add_report( $report = false ){ |
|
27 | + public function add_report( $report = false ) { |
|
28 | 28 | if ( empty( $report ) || ! is_object( $report ) ) { |
29 | 29 | return; |
30 | 30 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | \ No newline at end of file |
@@ -94,14 +94,14 @@ discard block |
||
94 | 94 | $data['usagetracking'] = get_option( 'monsterinsights_usage_tracking_config', false ); |
95 | 95 | $data['usercount'] = function_exists( 'get_user_count' ) ? get_user_count() : 'Not Set'; |
96 | 96 | $data['usesauth'] = $usesauth; |
97 | - $data['timezoneoffset']= date('P'); |
|
98 | - $data['installed_lite']= get_option( 'monsterinsights_installed_lite', array() ); |
|
97 | + $data['timezoneoffset'] = date( 'P' ); |
|
98 | + $data['installed_lite'] = get_option( 'monsterinsights_installed_lite', array() ); |
|
99 | 99 | $data['installed_pro'] = get_option( 'monsterinsights_installed_pro', array() ); |
100 | 100 | |
101 | 101 | |
102 | 102 | |
103 | 103 | // Retrieve current plugin information |
104 | - if( ! function_exists( 'get_plugins' ) ) { |
|
104 | + if ( ! function_exists( 'get_plugins' ) ) { |
|
105 | 105 | include ABSPATH . '/wp-admin/includes/plugin.php'; |
106 | 106 | } |
107 | 107 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | foreach ( $plugins as $key => $plugin ) { |
112 | 112 | if ( in_array( $plugin, $active_plugins ) ) { |
113 | 113 | // Remove active plugins from list so we can show active and inactive separately |
114 | - unset( $plugins[ $key ] ); |
|
114 | + unset( $plugins[$key] ); |
|
115 | 115 | } |
116 | 116 | } |
117 | 117 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | return false; |
130 | 130 | } |
131 | 131 | |
132 | - if( ! $this->tracking_allowed() && ! $override ) { |
|
132 | + if ( ! $this->tracking_allowed() && ! $override ) { |
|
133 | 133 | return false; |
134 | 134 | } |
135 | 135 | |
@@ -161,15 +161,15 @@ discard block |
||
161 | 161 | public function schedule_send() { |
162 | 162 | if ( ! wp_next_scheduled( 'monsterinsights_usage_tracking_cron' ) ) { |
163 | 163 | $tracking = array(); |
164 | - $tracking['day'] = rand( 0, 6 ); |
|
164 | + $tracking['day'] = rand( 0, 6 ); |
|
165 | 165 | $tracking['hour'] = rand( 0, 23 ); |
166 | 166 | $tracking['minute'] = rand( 0, 59 ); |
167 | 167 | $tracking['second'] = rand( 0, 59 ); |
168 | - $tracking['offset'] = ( $tracking['day'] * DAY_IN_SECONDS ) + |
|
169 | - ( $tracking['hour'] * HOUR_IN_SECONDS ) + |
|
168 | + $tracking['offset'] = ( $tracking['day'] * DAY_IN_SECONDS ) + |
|
169 | + ( $tracking['hour'] * HOUR_IN_SECONDS ) + |
|
170 | 170 | ( $tracking['minute'] * MINUTE_IN_SECONDS ) + |
171 | 171 | $tracking['second']; |
172 | - $tracking['initsend'] = strtotime("next sunday") + $tracking['offset']; |
|
172 | + $tracking['initsend'] = strtotime( "next sunday" ) + $tracking['offset']; |
|
173 | 173 | |
174 | 174 | wp_schedule_event( $tracking['initsend'], 'weekly', 'monsterinsights_usage_tracking_cron' ); |
175 | 175 | update_option( 'monsterinsights_usage_tracking_config', $tracking ); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | parent::__construct(); |
24 | 24 | } |
25 | 25 | |
26 | - protected function get_report_html( $data = array() ){ |
|
26 | + protected function get_report_html( $data = array() ) { |
|
27 | 27 | return $this->get_upsell_notice(); |
28 | 28 | } |
29 | 29 | } |