* @license GPL-2.0+ * @link https://wpadpresso.com * * @wordpress-plugin * Plugin Name: AdPresso * Description: Manage and optimize your ads in WordPress * Version: 0.9.6 * Plugin URI: https://wpadpresso.com * Author: AdPresso * Text Domain: adpresso * Domain Path: /languages * License: GPLv2 or later * License URI: https://www.gnu.org/licenses/gpl-2.0.html * Requires at least: 6.5 * Requires PHP: 8.0 */ use AdPresso\Autoloader; use AdPresso\Install\Installer; use AdPresso\Plugin; use AdPresso\Pro\Installation\CapabilityManager; if ( !defined( 'ABSPATH' ) ) { exit; } if ( defined( 'ADPRESSO_FILE' ) ) { return; } define( 'ADPRESSO_FILE', __FILE__ ); define( 'ADPRESSO_VERSION', '0.9.6' ); require_once __DIR__ . '/includes/class-autoloader.php'; Autoloader::get()->initialize(); if ( !function_exists( 'adpresso_fs' ) ) { // Create a helper function for easy SDK access. function adpresso_fs() { global $adpresso_fs; if ( !isset( $adpresso_fs ) ) { // Activate multisite network integration. if ( !defined( 'WP_FS__PRODUCT_20563_MULTISITE' ) ) { define( 'WP_FS__PRODUCT_20563_MULTISITE', true ); } // Include Freemius SDK. // SDK is auto-loaded through Composer $adpresso_fs = fs_dynamic_init( array( 'id' => '20563', 'slug' => 'adpresso', 'premium_slug' => 'adpresso', 'type' => 'plugin', 'public_key' => 'pk_b098a09412793005417a629ffc69d', 'is_premium' => false, 'premium_suffix' => 'Pro', 'has_addons' => false, 'has_paid_plans' => true, 'menu' => array( 'slug' => 'adpresso', 'contact' => false, 'support' => false, ), 'is_live' => true, 'is_org_compliant' => true, ) ); } return $adpresso_fs; } // Init Freemius. adpresso_fs(); // Signal that SDK was initiated. do_action( 'adpresso_fs_loaded' ); } if ( !function_exists( 'adpresso' ) ) { /** * Returns the main instance of AdPresso. * * @return Plugin */ function adpresso() : Plugin { return Plugin::get(); } } $installer = new Installer(); register_activation_hook( ADPRESSO_FILE, [$installer, 'install'] ); add_action( 'plugins_loaded', static function () { adpresso()->boot(); do_action( 'adpresso.loaded', adpresso() ); } );