PluginProbe
Stream – Activity Log & Audit Trail / 4.0.2
Stream – Activity Log & Audit Trail v4.0.2
4.4.0 4.3.0 4.2.2 4.2.1 trunk 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.1 3.1.1 3.10.0 3.2.0 3.2.1 3.2.2 3.2.3 All 50 releases
← All changes | stream.php +19 -11 3.0.04.0.2 View file →
@@ -1,19 +1,21 @@
1 1 <?php
2 2 /**
3 3 * Plugin Name: Stream
4 - * Plugin URI: https://wp-stream.com/
4 + * Plugin URI: https://xwp.co/work/stream/
5 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.0.0
7 - * Author: Stream
8 - * Author URI: https://wp-stream.com/
6 + * Version: 4.0.2
7 + * Author: XWP
8 + * Author URI: https://xwp.co
9 9 * License: GPLv2+
10 10 * Text Domain: stream
11 11 * Domain Path: /languages
12 + *
13 + * @package WP_Stream
12 14 */
13 15
14 16 /**
15 - * Copyright (c) 2015 WP Stream Pty Ltd (https://wp-stream.com/)
17 + * Copyright (c) 2015 XWP.Co Pty Ltd. (https://xwp.co/)
16 18 *
17 19 * This program is free software; you can redistribute it and/or modify
18 20 * it under the terms of the GNU General Public License, version 2 or, at
19 21 * your discretion, any later version, as published by the Free
@@ -28,24 +30,30 @@
28 30 * along with this program; if not, write to the Free Software
29 31 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 32 */
31 33
32 -if ( ! version_compare( PHP_VERSION, '5.3', '>=' ) ) {
33 - load_plugin_textdomain( 'stream', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
34 +const WP_STREAM_MIN_PHP_VERSION = '7.0';
35 +
36 +if ( version_compare( PHP_VERSION, WP_STREAM_MIN_PHP_VERSION, '<' ) ) {
34 37 add_action( 'shutdown', 'wp_stream_fail_php_version' );
35 38 } else {
36 39 require __DIR__ . '/classes/class-plugin.php';
37 - $GLOBALS['wp_stream'] = new WP_Stream\Plugin();
40 + $plugin_class_name = 'WP_Stream\Plugin';
41 + if ( class_exists( $plugin_class_name ) ) {
42 + $GLOBALS['wp_stream'] = new $plugin_class_name();
43 + }
38 44 }
39 45
40 46 /**
41 - * Invoked when the PHP version check fails
47 + * Invoked when the PHP version check fails.
48 + *
42 49 * Load up the translations and add the error message to the admin notices.
43 50 */
44 51 function wp_stream_fail_php_version() {
45 52 load_plugin_textdomain( 'stream', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
46 53
47 - $message = esc_html__( 'Stream requires PHP version 5.3+, plugin is currently NOT ACTIVE.', 'stream' );
54 + /* translators: %s is the minimum PHP version. */
55 + $message = sprintf( __( 'Stream requires PHP version %s or newer. Plugin is currently NOT ACTIVE.', 'stream' ), WP_STREAM_MIN_PHP_VERSION );
48 56 $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
49 57
50 58 echo wp_kses_post( $html_message );
51 59 }
@@ -50,9 +58,9 @@
50 58 echo wp_kses_post( $html_message );
51 59 }
52 60
53 61 /**
54 - * Helper for external plugins which wish to use Stream
62 + * Helper for external plugins which wish to use Stream.
55 63 *
56 64 * @return WP_Stream\Plugin
57 65 */
58 66 function wp_stream_get_instance() {