array( 'minimum' => '2.6', 'name' => 'AffiliateWP', 'exists' => true, 'current' => false, 'checked' => false, 'met' => false, ), ); /** * Bootstrap everything. * * @since 1.1 */ public function bootstrap() { if ( ! class_exists( 'Affiliate_WP' ) ) { if ( ! class_exists( 'AffiliateWP_Activation' ) ) { require_once 'includes/lib/affwp/class-affiliatewp-activation.php'; } // AffiliateWP activation. if ( ! class_exists( 'Affiliate_WP' ) ) { $activation = new AffiliateWP_Activation( plugin_dir_path( __FILE__ ), basename( __FILE__ ) ); $activation = $activation->run(); } } else { \AffiliateWP_Force_Pending_Referrals::instance( __FILE__ ); } } /** * Loads the add-on. * * @since 1.1 */ protected function load() { // Maybe include the bundled bootstrapper. if ( ! class_exists( 'AffiliateWP_Force_Pending_Referrals' ) ) { require_once dirname( __FILE__ ) . '/includes/class-affiliatewp-force-pending-referrals.php'; } // Maybe hook-in the bootstrapper. if ( class_exists( 'AffiliateWP_Force_Pending_Referrals' ) ) { // Bootstrap to plugins_loaded. $affwp_version = get_option( 'affwp_version' ); if ( version_compare( $affwp_version, '2.7', '>=' ) ) { add_action( 'affwp_plugins_loaded', array( $this, 'bootstrap' ), 100 ); } else { add_action( 'plugins_loaded', array( $this, 'bootstrap' ), 100 ); } // Register the activation hook. register_activation_hook( __FILE__, array( $this, 'install' ) ); } } /** * Install, usually on an activation hook. * * @since 1.1 */ public function install() { // Bootstrap to include all of the necessary files. $this->bootstrap(); if ( defined( 'AFFWP_FPR_VERSION' ) ) { update_option( 'affwp_fpr_version', AFFWP_FPR_VERSION ); } } /** * Plugin-specific aria label text to describe the requirements link. * * @since 1.1 * * @return string Aria label text. */ protected function unmet_requirements_label() { return esc_html__( 'AffiliateWP - Force Pending Referrals Requirements', 'affiliatewp-force-pending-referrals' ); } /** * Plugin-specific text used in CSS to identify attribute IDs and classes. * * @since 1.1 * * @return string CSS selector. */ protected function unmet_requirements_name() { return 'affiliatewp-force-pending-referrals-requirements'; } /** * Plugin specific URL for an external requirements page. * * @since 1.1 * * @return string Unmet requirements URL. */ protected function unmet_requirements_url() { return 'https://affiliatewp.com/docs/minimum-requirements-roadmap/'; } } $requirements = new AffiliateWP_FPR_Requirements_Check( __FILE__ ); $requirements->maybe_load();