| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Freesoul Deactivate Plugins |
| 4 |
* Plugin URI: https://freesoul-deactivate-plugins.com/ |
| 5 |
* Description: Disable plugins on specific pages to improve performance and troubleshoot issues, even on sites with many plugins. |
| 6 |
* Author: Jose Mortellaro |
| 7 |
* Author URI: https://josemortellaro.com |
| 8 |
* Domain Path: /languages/ |
| 9 |
* Text Domain: freesoul-deactivate-plugins |
| 10 |
* Requires PHP: 7.2 |
| 11 |
* Requires CP: 1.4 |
| 12 |
* Premium URI: https://freesoul-deactivate-plugins.com/ |
| 13 |
* Version: 2.6.3 |
| 14 |
* |
| 15 |
* @package Freesoul Deactivate Plugins |
| 16 |
*/ |
| 17 |
|
| 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 as published by |
| 21 |
* the Free Software Foundation; either version 2 of the License, or |
| 22 |
* (at your option) any later version. |
| 23 |
* This program is distributed in the hope that it will be useful, |
| 24 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 25 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 26 |
* GNU General Public License for more details. |
| 27 |
*/ |
| 28 |
|
| 29 |
defined( 'ABSPATH' ) || exit; // Exit if accessed directly. |
| 30 |
|
| 31 |
// Don't run on frontend if constants defined. |
| 32 |
if ( ! is_admin() && defined( 'FDP_EXCLUDE_FRONT' ) && FDP_EXCLUDE_FRONT && isset( $_GET[ FDP_EXCLUDE_FRONT ] ) && 'true' === $_GET[ FDP_EXCLUDE_FRONT ] ) { |
| 33 |
return; |
| 34 |
} |
| 35 |
|
| 36 |
if( defined( 'FDP_STANDARD_DISABLED' ) && FDP_STANDARD_DISABLED ) { |
| 37 |
// Don't run if current URL is in the array defined in 'FDP_SKIP_URLS' in wp-config.php. |
| 38 |
return; |
| 39 |
} |
| 40 |
|
| 41 |
// Definitions. |
| 42 |
define( 'EOS_DP_VERSION', '2.6.3' ); |
| 43 |
define( 'FDP_PLUGIN_FILE', __FILE__ ); |
| 44 |
define( 'EOS_DP_PLUGIN_DIR', untrailingslashit( dirname( __FILE__ ) ) ); |
| 45 |
define( 'EOS_DP_PLUGIN_URL', untrailingslashit( plugins_url( '', __FILE__ ) ) ); |
| 46 |
define( 'EOS_DP_PLUGIN_BASE_NAME', untrailingslashit( plugin_basename( __FILE__ ) ) ); |
| 47 |
define( 'EOS_DP_PLUGINS_DIRNAME', basename( dirname( __DIR__ ) ) ); |
| 48 |
define( 'EOS_DP_MAIN_STYLESHEET', EOS_DP_PLUGIN_URL . '/admin/assets/css/fdp-admin-3.9.6' ); |
| 49 |
define( 'EOS_DP_MAIN_JS', EOS_DP_PLUGIN_URL . '/admin/assets/js/fdp-admin-5.0.5' ); |
| 50 |
define( 'EOS_DP_SETTINGS_JS_URL', EOS_DP_PLUGIN_URL . '/admin/assets/js/fdp-settings-1.1.1.js' ); |
| 51 |
define( 'FDP_DOC_URL', 'https://freesoul-deactivate-plugins.com/how-deactivate-plugins-on-specific-pages/' ); |
| 52 |
|
| 53 |
require EOS_DP_PLUGIN_DIR . '/fdp-load.php'; // FDP Bootstrap file. |
| 54 |
|
| 55 |
do_action( 'fdp_loaded' ); // Fire action hook after FDP is loaded. |