| @@ -1,31 +1,34 @@ | ||
| 1 | 1 | <?php defined('ABSPATH') or die; |
| 2 | - | |
| 3 | -/* | |
| 4 | -Plugin Name: Fluent Support | |
| 5 | -Description: The Ultimate Support Plugin For Your WordPress. | |
| 6 | -Version: 1.4.6 | |
| 7 | -Author: WPManageNinja LLC | |
| 8 | -Author URI: https://wpmanageninja.com | |
| 9 | -Plugin URI: https://fluentsupport.com | |
| 10 | -License: GPLv2 or later | |
| 11 | -Text Domain: fluent-support | |
| 12 | -Domain Path: /language | |
| 2 | +/** | |
| 3 | + * Plugin Name: Fluent Support | |
| 4 | + * Description: The Ultimate Support Plugin For Your WordPress. | |
| 5 | + * Version: 2.4.0 | |
| 6 | + * Author: WPManageNinja LLC | |
| 7 | + * Author URI: https://wpmanageninja.com | |
| 8 | + * Plugin URI: https://fluentsupport.com | |
| 9 | + * License: GPLv2 or later | |
| 10 | + * Text Domain: fluent-support | |
| 11 | + * Domain Path: /language | |
| 13 | 12 | */ |
| 14 | 13 | |
| 15 | -define('FLUENT_SUPPORT_VERSION', '1.4.6'); | |
| 14 | +define('FLUENT_SUPPORT_VERSION', '2.4.0'); | |
| 15 | +define('FLUENT_SUPPORT_DB_VERSION', '1.0.6'); | |
| 16 | +define('FLUENT_SUPPORT_PRO_MIN_VERSION', '2.4.0'); | |
| 16 | 17 | define('FLUENT_SUPPORT_UPLOAD_DIR', 'fluent-support'); |
| 17 | 18 | define('FLUENT_SUPPORT_PLUGIN_URL', plugin_dir_url(__FILE__)); |
| 19 | +define('FLUENT_SUPPORT_PLUGIN_PATH', plugin_dir_path(__FILE__)); | |
| 18 | 20 | |
| 19 | -require __DIR__.'/vendor/autoload.php'; | |
| 21 | +require __DIR__ . '/vendor/autoload.php'; | |
| 20 | 22 | |
| 21 | -call_user_func(function($bootstrap) { | |
| 23 | +call_user_func(function ($bootstrap) { | |
| 22 | 24 | $bootstrap(__FILE__); |
| 23 | -}, require(__DIR__.'/boot/app.php')); | |
| 25 | +}, require(__DIR__ . '/boot/app.php')); | |
| 24 | 26 | |
| 25 | 27 | |
| 26 | -// Handle Network new Site Activation | |
| 27 | -add_action('wpmu_new_blog', function ($blogId) { | |
| 28 | - switch_to_blog($blogId); | |
| 29 | - (new \FluentSupport\App\Hooks\Handlers\ActivationHandler)->handle(false); | |
| 30 | - restore_current_blog(); | |
| 28 | +add_action('wp_insert_site', function ($new_site) { | |
| 29 | + if (is_plugin_active_for_network('fluent-support/fluent-support.php')) { | |
| 30 | + switch_to_blog($new_site->blog_id); | |
| 31 | + (new \FluentSupport\App\Hooks\Handlers\ActivationHandler)->handle(false); | |
| 32 | + restore_current_blog(); | |
| 33 | + } | |
| 31 | 34 | }); |