PluginProbe
Stream – Activity Log & Audit Trail / 3.4.2
Stream – Activity Log & Audit Trail v3.4.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 | classes/class-network.php +4 -26 3.2.33.4.2 View file →
@@ -3,8 +3,9 @@
3 3
4 4 class Network {
5 5 /**
6 6 * Hold Plugin class
7 + *
7 8 * @var Plugin
8 9 */
9 10 public $plugin;
10 11
@@ -90,36 +91,12 @@
90 91 *
91 92 * @return bool
92 93 */
93 94 public function is_network_activated() {
94 - if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
95 - require_once ABSPATH . '/wp-admin/includes/plugin.php';
96 - }
97 -
98 - if ( $this->is_mustuse() ) {
99 - return true;
100 - }
101 -
102 - return is_plugin_active_for_network( $this->plugin->locations['plugin'] );
95 + return $this->plugin->is_network_activated();
103 96 }
104 97
105 98 /**
106 - * Returns true if Stream is a must-use plugin, otherwise false
107 - *
108 - * @return bool
109 - */
110 - public function is_mustuse() {
111 -
112 - $stream_php = trailingslashit( WPMU_PLUGIN_DIR ) . $this->plugin->locations['plugin'];
113 -
114 - if ( file_exists( $stream_php ) && class_exists( 'WP_Stream\Plugin' ) ) {
115 - return true;
116 - }
117 -
118 - return false;
119 - }
120 -
121 - /**
122 99 * Adds Stream to the admin bar under the "My Sites > Network Admin" menu
123 100 * if Stream has been network-activated.
124 101 *
125 102 * @action admin_bar_menu
@@ -200,9 +177,10 @@
200 177 $current_page = wp_stream_filter_input( INPUT_GET, 'page' );
201 178 $action = add_query_arg(
202 179 array(
203 180 'action' => $current_page,
204 - ), 'edit.php'
181 + ),
182 + 'edit.php'
205 183 );
206 184 }
207 185
208 186 return $action;