Skip to content

Commit fac6064

Browse files
author
Kaspars Dambis
authored
Release 3.4.1 (#1030)
1 parent e4e88d4 commit fac6064

File tree

6 files changed

+25
-27
lines changed

6 files changed

+25
-27
lines changed

classes/class-author.php

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -222,22 +222,18 @@ public function is_wp_cli() {
222222
}
223223

224224
/**
225-
* True if doing WP Cron, otherwise false
225+
* Check if the current request is part of a WP cron task.
226226
*
227-
* Note: If native WP Cron has been disabled and you are
228-
* hitting the cron endpoint with a system cron job, this
229-
* method will always return false.
227+
* Note: This will return true for all manual or custom
228+
* cron runs even if the default front-end cron is disabled.
229+
*
230+
* We're not using `wp_doing_cron()` since it was introduced
231+
* only in WordPress 4.8.0.
230232
*
231233
* @return bool
232234
*/
233235
public function is_doing_wp_cron() {
234-
return (
235-
wp_stream_is_cron_enabled()
236-
&&
237-
defined( 'DOING_CRON' )
238-
&&
239-
DOING_CRON
240-
);
236+
return ( defined( 'DOING_CRON' ) && DOING_CRON );
241237
}
242238

243239
/**

classes/class-plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Plugin {
99
*
1010
* @const string
1111
*/
12-
const VERSION = '3.4.0';
12+
const VERSION = '3.4.1';
1313

1414
/**
1515
* WP-CLI command

classes/class-settings.php

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -381,19 +381,16 @@ public function get_fields() {
381381
array_push( $fields['advanced']['fields'], $akismet_tracking );
382382
}
383383

384-
// If WP Cron is enabled, allow Admins to opt-in to WP Cron tracking
385-
if ( wp_stream_is_cron_enabled() ) {
386-
$wp_cron_tracking = array(
387-
'name' => 'wp_cron_tracking',
388-
'title' => esc_html__( 'WP Cron Tracking', 'stream' ),
389-
'type' => 'checkbox',
390-
'desc' => esc_html__( 'By default, Stream does not track activity performed by WordPress cron events unless you opt-in here. Enabling this is not necessary or recommended for most sites.', 'stream' ),
391-
'after_field' => esc_html__( 'Enabled', 'stream' ),
392-
'default' => 0,
393-
);
384+
$wp_cron_tracking = array(
385+
'name' => 'wp_cron_tracking',
386+
'title' => esc_html__( 'WP Cron Tracking', 'stream' ),
387+
'type' => 'checkbox',
388+
'desc' => esc_html__( 'By default, Stream does not track activity performed by WordPress cron events unless you opt-in here. Enabling this is not necessary or recommended for most sites.', 'stream' ),
389+
'after_field' => esc_html__( 'Enabled', 'stream' ),
390+
'default' => 0,
391+
);
394392

395-
array_push( $fields['advanced']['fields'], $wp_cron_tracking );
396-
}
393+
array_push( $fields['advanced']['fields'], $wp_cron_tracking );
397394

398395
/**
399396
* Filter allows for modification of options fields

includes/functions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ function wp_stream_is_vip() {
116116
}
117117

118118
/**
119-
* True if native WP Cron is enabled, otherwise false
119+
* Check if the default front-end WP Cron is enabled. It doesn't
120+
* mean that the Cron is disabled in general.
120121
*
121122
* @return bool
122123
*/

readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: lukecarbis, fjarrett, stream, xwp
33
Tags: wp stream, stream, activity, logs, track
44
Requires at least: 4.5
55
Tested up to: 5.2
6-
Stable tag: 3.4.0
6+
Stable tag: 3.4.1
77
License: GPLv2 or later
88
License URI: https://www.gnu.org/licenses/gpl-2.0.html
99

@@ -87,6 +87,10 @@ Thank you for wanting to make Stream better for everyone!
8787

8888
== Changelog ==
8989

90+
= 3.4.1 - July 25, 2019 =
91+
92+
* Fix: Allow tracking cron events even when the default WordPress front-end cron runner is disabled via `DISABLE_WP_CRON`. See [#959], props [@khromov](https://github.com/khromov) and [@tareiking](https://github.com/tareiking).
93+
9094
= 3.4.0 - July 13, 2019 =
9195

9296
* New: Add development environment and documentation, update tooling [#1016](https://github.com/xwp/stream/pull/1016).

stream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Stream
44
* Plugin URI: https://wp-stream.com/
55
* Description: Stream tracks logged-in user activity so you can monitor every change made on your WordPress site in beautifully organized detail. All activity is organized by context, action and IP address for easy filtering. Developers can extend Stream with custom connectors to log any kind of action.
6-
* Version: 3.4.0
6+
* Version: 3.4.1
77
* Author: XWP
88
* Author URI: https://xwp.co/
99
* License: GPLv2+

0 commit comments

Comments
 (0)