PluginProbe
Stream – Activity Log & Audit Trail / 4.2.2
Stream – Activity Log & Audit Trail v4.2.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
stream / stream.php

stream.php in Stream – Activity Log & Audit Trail 4.2.2, at stream.php

80 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Stream
4 * Plugin URI: https://xwp.co/work/stream/
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: 4.2.2
7 * Author: XWP
8 * Author URI: https://xwp.co
9 * License: GPLv2+
10 * Text Domain: stream
11 * Domain Path: /languages
12 *
13 * @package WP_Stream
14 */
15
16 /**
17 * Copyright (c) 2015 XWP.Co Pty Ltd. (https://xwp.co/)
18 *
19 * This program is free software; you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License, version 2 or, at
21 * your discretion, any later version, as published by the Free
22 * Software Foundation.
23 *
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
28 *
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
32 */
33
34 /**
35 * Configuration Constants
36 */
37 if ( ! defined( 'ABSPATH' ) ) {
38 exit;
39 }
40
41 if ( ! defined( 'WP_STREAM_SETTINGS_CAPABILITY' ) ) {
42 define( 'WP_STREAM_SETTINGS_CAPABILITY', 'manage_options' );
43 }
44
45 const WP_STREAM_MIN_PHP_VERSION = '7.2';
46
47 if ( version_compare( PHP_VERSION, WP_STREAM_MIN_PHP_VERSION, '<' ) ) {
48 add_action( 'shutdown', 'wp_stream_fail_php_version' );
49 } else {
50 require __DIR__ . '/classes/class-plugin.php';
51 $plugin_class_name = 'WP_Stream\Plugin';
52 if ( class_exists( $plugin_class_name ) ) {
53 $GLOBALS['wp_stream'] = new $plugin_class_name();
54 }
55 }
56
57 /**
58 * Invoked when the PHP version check fails.
59 *
60 * Load up the translations and add the error message to the admin notices.
61 */
62 function wp_stream_fail_php_version() {
63 load_plugin_textdomain( 'stream', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
64
65 /* translators: %s is the minimum PHP version. */
66 $message = sprintf( __( 'Stream requires PHP version %s or newer. Plugin is currently NOT ACTIVE.', 'stream' ), WP_STREAM_MIN_PHP_VERSION );
67 $html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
68
69 echo wp_kses_post( $html_message );
70 }
71
72 /**
73 * Helper for external plugins which wish to use Stream.
74 *
75 * @return WP_Stream\Plugin
76 */
77 function wp_stream_get_instance() {
78 return $GLOBALS['wp_stream'];
79 }
80