| 1 |
<?php |
| 2 |
|
| 3 |
/* |
| 4 |
* Plugin Name: Plover Kit |
| 5 |
* Plugin URI: https://wpplover.com/plugins/plover-kit |
| 6 |
* Description: Plover kit have pluggable modules that enhance the Gutenberg core blocks and also provide extended features. |
| 7 |
* Author: WP Plover |
| 8 |
* Author URI: https://www.wpplover.com |
| 9 |
* Version: 1.7.1 |
| 10 |
* Requires at least: 6.4 |
| 11 |
* Requires PHP: 7.4 |
| 12 |
* License: GPLv2 |
| 13 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 14 |
* Text Domain: plover-kit |
| 15 |
*/ |
| 16 |
// Exit if accessed directly. |
| 17 |
if ( !defined( 'ABSPATH' ) ) { |
| 18 |
exit; |
| 19 |
} |
| 20 |
// Defining plugin constants. |
| 21 |
if ( !defined( 'PLOVER_KIT_SLUG' ) ) { |
| 22 |
define( 'PLOVER_KIT_SLUG', 'plover-kit' ); |
| 23 |
} |
| 24 |
if ( !defined( 'PLOVER_KIT_VERSION' ) ) { |
| 25 |
define( 'PLOVER_KIT_VERSION', '1.7.1' ); |
| 26 |
} |
| 27 |
if ( !defined( 'PLOVER_KIT_PLUGIN_FILE' ) ) { |
| 28 |
/** |
| 29 |
* @since 1.7.0 |
| 30 |
*/ |
| 31 |
define( 'PLOVER_KIT_PLUGIN_FILE', plugin_basename( __FILE__ ) ); |
| 32 |
} |
| 33 |
if ( !defined( 'PLOVER_KIT_PLUGIN_PATH' ) ) { |
| 34 |
define( 'PLOVER_KIT_PLUGIN_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) ); |
| 35 |
} |
| 36 |
if ( !defined( 'PLOVER_KIT_API_HOST' ) ) { |
| 37 |
define( 'PLOVER_KIT_API_HOST', 'https://api.wpplover.com/' ); |
| 38 |
} |
| 39 |
if ( !defined( 'PLOVER_KIT_API_V1' ) ) { |
| 40 |
define( 'PLOVER_KIT_API_V1', untrailingslashit( PLOVER_KIT_API_HOST ) . '/index.php?rest_route=/plover-kit-api/v1' ); |
| 41 |
} |
| 42 |
if ( !defined( 'PLOVER_KIT_REMOTE_PATTERNS_CACHE_IN_SECONDS' ) ) { |
| 43 |
/** |
| 44 |
* @since 1.1.0 |
| 45 |
*/ |
| 46 |
define( 'PLOVER_KIT_REMOTE_PATTERNS_CACHE_IN_SECONDS', DAY_IN_SECONDS ); |
| 47 |
} |
| 48 |
if ( function_exists( 'plover_fs' ) ) { |
| 49 |
plover_fs()->set_basename( false, __FILE__ ); |
| 50 |
} else { |
| 51 |
if ( !function_exists( 'plover_fs' ) ) { |
| 52 |
// Create a helper function for easy SDK access. |
| 53 |
function plover_fs() { |
| 54 |
global $plover_fs; |
| 55 |
if ( !isset( $plover_fs ) ) { |
| 56 |
// Activate multisite network integration. |
| 57 |
if ( !defined( 'WP_FS__PRODUCT_15782_MULTISITE' ) ) { |
| 58 |
define( 'WP_FS__PRODUCT_15782_MULTISITE', true ); |
| 59 |
} |
| 60 |
// Include Freemius SDK. |
| 61 |
require_once dirname( __FILE__ ) . '/freemius/start.php'; |
| 62 |
$plover_fs = fs_dynamic_init( array( |
| 63 |
'id' => '15782', |
| 64 |
'slug' => 'plover-kit', |
| 65 |
'type' => 'plugin', |
| 66 |
'public_key' => 'pk_100767648311be1f84cbfd9f5ea53', |
| 67 |
'is_premium' => false, |
| 68 |
'premium_suffix' => 'Premium', |
| 69 |
'has_addons' => false, |
| 70 |
'has_paid_plans' => true, |
| 71 |
'has_affiliation' => 'selected', |
| 72 |
'menu' => array( |
| 73 |
'slug' => 'plover-kit', |
| 74 |
), |
| 75 |
'is_live' => true, |
| 76 |
'is_org_compliant' => true, |
| 77 |
) ); |
| 78 |
} |
| 79 |
return $plover_fs; |
| 80 |
} |
| 81 |
|
| 82 |
// Init Freemius. |
| 83 |
plover_fs(); |
| 84 |
// Signal that SDK was initiated. |
| 85 |
do_action( 'plover_fs_loaded' ); |
| 86 |
} |
| 87 |
// Require plover-core if not loaded. |
| 88 |
if ( !function_exists( 'plover_core' ) ) { |
| 89 |
require_once PLOVER_KIT_PLUGIN_PATH . '/core/vendor/autoload.php'; |
| 90 |
} |
| 91 |
// Require plugin autoload file. |
| 92 |
require_once PLOVER_KIT_PLUGIN_PATH . '/vendor/autoload.php'; |
| 93 |
// Bootstrap plover core |
| 94 |
$bootstrap = \Plover\Core\Bootstrap::make( PLOVER_KIT_SLUG, dirname( __FILE__ ), ( version_compare( \Plover\Core\Plover::VERSION, '1.0.6', '>=' ) ? untrailingslashit( plugin_dir_url( __FILE__ ) ) : [] ) ); |
| 95 |
$bootstrap->withProviders( [ |
| 96 |
\Plover\Core\Nest\Cache\CacheServiceProvider::class, |
| 97 |
\Plover\Core\Services\CoreFeaturesServiceProvider::class, |
| 98 |
\Plover\Kit\Services\PluginServiceProvider::class, |
| 99 |
\Plover\Kit\Services\DashboardServiceProvider::class |
| 100 |
] ); |
| 101 |
$bootstrap->boot(); |
| 102 |
} |