PluginProbe
Plugin Detective – Troubleshooting Conflicts / 1.2.35
Plugin Detective – Troubleshooting Conflicts v1.2.35
1.2.35 1.2.33 1.2.32 1.2.31 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2 1.2.1 1.2.10 1.2.12 1.2.13 1.2.14 1.2.16 1.2.19 1.2.20 1.2.22 1.2.23 1.2.24 All 54 releases
← All changes | plugin-detective.php +21 -13 1.1.11.2.35 View file →
@@ -1,20 +1,20 @@
1 1 <?php
2 2 /**
3 - * Plugin Name: Plugin Detective - Troubleshooting
4 - * Plugin URI: https://nsqua.red
3 + * Plugin Name: Plugin Detective - Troubleshooting Conflicts
4 + * Plugin URI: https://nsquared.io
5 5 * Description: Quickly troubleshoot & fix plugin conflicts
6 - * Version: 1.1.1
7 - * Author: N Squared
8 - * Donate link: https://nsqua.red
6 + * Version: 1.2.35
7 + * Author: NSquared
8 + * Donate link: https://nsquared.io
9 9 * License: GPLv2
10 10 * Text Domain: plugin-detective
11 11 * Domain Path: /languages
12 12 *
13 - * @link https://nsqua.red
13 + * @link https://nsquared.io
14 14 *
15 15 * @package Plugin_Detective
16 - * @version 1.1.1
16 + * @version 1.2.35
17 17 *
18 18 * Built using generator-plugin-wp (https://github.com/WebDevStudios/generator-plugin-wp)
19 19 */
20 20
@@ -35,8 +35,10 @@
35 35 * along with this program; if not, write to the Free Software
36 36 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
37 37 */
38 38
39 +// Prevent direct access to this file.
40 +defined( 'ABSPATH' ) || exit;
39 41
40 42 /**
41 43 * Autoloads files with classes when needed.
42 44 *
@@ -70,11 +72,19 @@
70 72 *
71 73 * @var string
72 74 * @since 0.0.0
73 75 */
74 - const VERSION = '1.1.1';
76 + const VERSION = '1.2.35';
75 77
76 78 /**
79 + * wp admin instance class
80 + *
81 + * @var string
82 + * @since 0.0.0
83 + */
84 + protected $wp_admin = null;
85 +
86 + /**
77 87 * URL of plugin directory.
78 88 *
79 89 * @var string
80 90 * @since 0.0.0
@@ -196,11 +206,8 @@
196 206 if ( ! $this->check_requirements() ) {
197 207 return;
198 208 }
199 209
200 - // Load translated strings for plugin.
201 - load_plugin_textdomain( 'plugin-detective', false, dirname( $this->basename ) . '/languages/' );
202 -
203 210 // Initialize plugin classes.
204 211 $this->plugin_classes();
205 212 }
206 213
@@ -253,9 +260,9 @@
253 260 public function meets_requirements() {
254 261
255 262 // Do checks for required classes / functions or similar.
256 263 // Add detailed messages to $this->activation_errors array.
257 - if ( defined( 'MULTISITE' ) && !empty( MULTISITE ) || ( function_exists( 'is_multsite' ) && is_multsite() ) ) {
264 + if ( defined( 'MULTISITE' ) && MULTISITE || ( function_exists( 'is_multsite' ) && is_multsite() ) ) {
258 265 $this->activation_errors[] = '<h3>Plugin Detective doesn\'t support multisite (yet)</h3>
259 266 <p>Unfortunately we don\'t support multisite yet. We wanted to get Plugin Detective out there for people to use as soon as possible, but there’s a good amount of work to do before it will support multisite. As you may know, multisite can get a bit complicated.</p>
260 267
261 268 <p>With a single install, it’s easy to determine which plugins are active and manipulate them. With a multisite, there are network-activated plugins and plugins at the site level. And theoretically Plugin Detective could be run the whole network, or just looking at a single site. And there are permission differences between a network admin and a site admin. So it will take some work for us to support all that. We want to see how much interest there is in supporting multisite, and get some feedback from multisite users to understand what would be most useful for them and how they’d use it.</p>
@@ -283,8 +290,9 @@
283 290 */
284 291 public function requirements_not_met_notice() {
285 292
286 293 // Compile default message.
294 + /* translators: %s: URL of the WordPress plugins admin page. */
287 295 $default_message = sprintf( __( 'Plugin Detective is missing requirements and has been <a href="%s">deactivated</a>. Please make sure all requirements are available.', 'plugin-detective' ), admin_url( 'plugins.php' ) );
288 296
289 297 // Default details to null.
290 298 $details = null;
@@ -321,9 +329,9 @@
321 329 case 'path':
322 330 case 'wp_admin':
323 331 return $this->$field;
324 332 default:
325 - throw new Exception( 'Invalid ' . __CLASS__ . ' property: ' . $field );
333 + throw new Exception( 'Invalid ' . __CLASS__ . ' property: ' . esc_html( $field ) );
326 334 }
327 335 }
328 336
329 337 /**