Stream - Version 3.4.1

Version Description

  • July 25, 2019 =

  • Fix: Allow tracking cron events even when the default WordPress front-end cron runner is disabled via DISABLE_WP_CRON. See [#959], props @khromov and @tareiking.

Download this release

Release Info

Developer kasparsd
Plugin Icon 128x128 Stream
Version 3.4.1
Comparing to
See all releases

Code changes from version 3.4.0 to 3.4.1

classes/class-author.php CHANGED
@@ -222,22 +222,18 @@ class Author {
222
  }
223
 
224
  /**
225
- * True if doing WP Cron, otherwise false
226
  *
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.
 
 
230
  *
231
  * @return bool
232
  */
233
  public function is_doing_wp_cron() {
234
- return (
235
- wp_stream_is_cron_enabled()
236
- &&
237
- defined( 'DOING_CRON' )
238
- &&
239
- DOING_CRON
240
- );
241
  }
242
 
243
  /**
222
  }
223
 
224
  /**
225
+ * Check if the current request is part of a WP cron task.
226
  *
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.
232
  *
233
  * @return bool
234
  */
235
  public function is_doing_wp_cron() {
236
+ return ( defined( 'DOING_CRON' ) && DOING_CRON );
 
 
 
 
 
 
237
  }
238
 
239
  /**
classes/class-plugin.php CHANGED
@@ -9,7 +9,7 @@ class Plugin {
9
  *
10
  * @const string
11
  */
12
- const VERSION = '3.4.0';
13
 
14
  /**
15
  * WP-CLI command
9
  *
10
  * @const string
11
  */
12
+ const VERSION = '3.4.1';
13
 
14
  /**
15
  * WP-CLI command
classes/class-settings.php CHANGED
@@ -381,19 +381,16 @@ class Settings {
381
  array_push( $fields['advanced']['fields'], $akismet_tracking );
382
  }
383
 
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
- );
394
 
395
- array_push( $fields['advanced']['fields'], $wp_cron_tracking );
396
- }
397
 
398
  /**
399
  * Filter allows for modification of options fields
381
  array_push( $fields['advanced']['fields'], $akismet_tracking );
382
  }
383
 
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
+ );
 
 
392
 
393
+ array_push( $fields['advanced']['fields'], $wp_cron_tracking );
 
394
 
395
  /**
396
  * Filter allows for modification of options fields
contributing.md CHANGED
@@ -7,7 +7,6 @@ Stream uses [npm](https://npmjs.com) for javascript dependencies, [Composer](htt
7
 
8
  Included is a local development environment built with [Docker](https://www.docker.com) which can be optionally run inside [Vagrant](https://www.vagrantup.com) for network isolation and better performance.
9
 
10
-
11
  ### Requirements
12
 
13
  - [VirtualBox](https://www.virtualbox.org)
@@ -22,7 +21,6 @@ We suggest using the [Homebrew package manager](https://brew.sh) on macOS to ins
22
 
23
  For setups with local Docker environment you don't need Vagrant and VirtualBox.
24
 
25
-
26
  ### Environment Setup
27
 
28
  1. See the [Git Flow](#git-flow) section below for how to fork the repository.
@@ -31,6 +29,13 @@ For setups with local Docker environment you don't need Vagrant and VirtualBox.
31
  4. Visit [stream.local](https://stream.local) and login using `admin` / `password`.
32
  5. Activate the Stream plugin.
33
 
 
 
 
 
 
 
 
34
 
35
  ### Scripts and Commands
36
 
@@ -153,6 +158,6 @@ Please use the [git flow for pull requests](#git-flow) and follow [WordPress Cod
153
  git push origin <topic-branch-name>
154
  ```
155
 
156
- 7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) (with a clear title and description) to the `master` branch.
157
 
158
  **IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the [GPL v2 license](https://www.gnu.org/licenses/gpl-2.0.html).
7
 
8
  Included is a local development environment built with [Docker](https://www.docker.com) which can be optionally run inside [Vagrant](https://www.vagrantup.com) for network isolation and better performance.
9
 
 
10
  ### Requirements
11
 
12
  - [VirtualBox](https://www.virtualbox.org)
21
 
22
  For setups with local Docker environment you don't need Vagrant and VirtualBox.
23
 
 
24
  ### Environment Setup
25
 
26
  1. See the [Git Flow](#git-flow) section below for how to fork the repository.
29
  4. Visit [stream.local](https://stream.local) and login using `admin` / `password`.
30
  5. Activate the Stream plugin.
31
 
32
+ ### PHP Xdebug
33
+
34
+ The WordPress container includes the [Xdebug PHP extension](https://xdebug.org). It is configured to [autostart](https://xdebug.org/docs/remote#remote_autostart) and to [automatically detect the IP address of the connecting client](https://xdebug.org/docs/remote#remote_connect_back) running in your code editor. See [`.vscode/launch.json`](.vscode/launch.json) for the directory mapping from the WordPress container to the project directory in your code editor.
35
+
36
+ ### Mail Catcher
37
+
38
+ We use a [MailHog](https://github.com/mailhog/MailHog) container to capture all emails sent by the WordPress container, available at [stream.local:8025](https://stream.local:8025).
39
 
40
  ### Scripts and Commands
41
 
158
  git push origin <topic-branch-name>
159
  ```
160
 
161
+ 7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) (with a clear title and description) to the `develop` branch.
162
 
163
  **IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the [GPL v2 license](https://www.gnu.org/licenses/gpl-2.0.html).
includes/functions.php CHANGED
@@ -116,7 +116,8 @@ function wp_stream_is_vip() {
116
  }
117
 
118
  /**
119
- * True if native WP Cron is enabled, otherwise false
 
120
  *
121
  * @return bool
122
  */
116
  }
117
 
118
  /**
119
+ * Check if the default front-end WP Cron is enabled. It doesn't
120
+ * mean that the Cron is disabled in general.
121
  *
122
  * @return bool
123
  */
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: lukecarbis, fjarrett, stream, xwp
3
  Tags: wp stream, stream, activity, logs, track
4
  Requires at least: 4.5
5
  Tested up to: 5.2
6
- Stable tag: 3.4.0
7
  License: GPLv2 or later
8
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -87,6 +87,10 @@ Thank you for wanting to make Stream better for everyone!
87
 
88
  == Changelog ==
89
 
 
 
 
 
90
  = 3.4.0 - July 13, 2019 =
91
 
92
  * New: Add development environment and documentation, update tooling [#1016](https://github.com/xwp/stream/pull/1016).
3
  Tags: wp stream, stream, activity, logs, track
4
  Requires at least: 4.5
5
  Tested up to: 5.2
6
+ Stable tag: 3.4.1
7
  License: GPLv2 or later
8
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
 
87
 
88
  == Changelog ==
89
 
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
+
94
  = 3.4.0 - July 13, 2019 =
95
 
96
  * New: Add development environment and documentation, update tooling [#1016](https://github.com/xwp/stream/pull/1016).
stream.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Stream
4
  * Plugin URI: https://wp-stream.com/
5
  * 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
7
  * Author: XWP
8
  * Author URI: https://xwp.co/
9
  * License: GPLv2+
3
  * Plugin Name: Stream
4
  * Plugin URI: https://wp-stream.com/
5
  * 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.1
7
  * Author: XWP
8
  * Author URI: https://xwp.co/
9
  * License: GPLv2+