'34965', 'slug' => 'adinav-accessibility-audit-eaa', 'premium_slug' => 'adinav-accessibility-audit-eaa-premium', 'type' => 'plugin', 'public_key' => 'pk_83b967ef44a98f18ae62ecd941f37', 'is_premium' => false, 'premium_suffix' => 'Pro', 'has_addons' => false, 'has_paid_plans' => true, 'menu' => array( 'slug' => 'adinav-accessibility-audit-eaa', 'contact' => false, 'support' => false, ), 'is_live' => true, 'is_org_compliant' => true, ) ); } return $adnvaa_fs; } adnvaa_fs(); do_action( 'adnvaa_fs_loaded' ); } require_once ADNVAA_DIR . 'includes/class-adnvaa-uninstall.php'; /* * Freemius owns the uninstall process, so cleanup is registered here rather * than shipped as uninstall.php. Freemius rejects deployments that contain * both, and rightly: two uninstall paths means one of them silently stops * running and the user is left with our table in their database. */ adnvaa_fs()->add_action( 'after_uninstall', array('ADNVAA_Uninstall', 'run') ); require_once ADNVAA_DIR . 'includes/class-adnvaa-store.php'; require_once ADNVAA_DIR . 'includes/class-adnvaa-rules.php'; require_once ADNVAA_DIR . 'includes/class-adnvaa-analyzer.php'; require_once ADNVAA_DIR . 'includes/class-adnvaa-scanner.php'; require_once ADNVAA_DIR . 'includes/class-adnvaa-statement.php'; if ( is_admin() ) { require_once ADNVAA_DIR . 'admin/class-adnvaa-admin.php'; add_action( 'plugins_loaded', array('ADNVAA_Admin', 'init') ); } /** * Is the premium functionality both PRESENT and PAID FOR right now? * * Every premium feature must be gated on this and nothing else. Two conditions, * and they are genuinely distinct: * * 1. ADNVAA_PREMIUM_BUILD — is the code even here? Undefined in the free build, * because the block that defines it is stripped along with /includes/pro/. * Without this check, the free build would fatal on the first reference to * a class that does not exist in it. * 2. is_paying_or_trial() — is the licence live *today*? A licence that has * lapsed must fall back to the free behaviour rather than keep working, * otherwise nobody has any reason to renew and the recurring model is * decorative. * * Note the deliberate structure: the entitlement check must NOT be written as a * single expression that combines the SDK's premium-code test with anything * else. The preprocessor removes whole statements containing that call, so * `return premium_test() && b();` would become `return && b();` in the free * build — a parse error that takes the entire plugin down. Routing it through a * constant defined inside the stripped block is what keeps both builds valid. * * The same reasoning is why neither that method name nor the header annotation * is spelled out anywhere in these comments. The preprocessor matches raw text * and does not respect comment boundaries — it was observed deleting an * explanatory line from inside a docblock in the 0.2.0 build. A comment * mentioning the token can therefore take live code out with it. * * @return bool */ if ( !function_exists( 'adnvaa_is_pro' ) ) { /* * Guarded for the same reason adnvaa_fs() is, and it is not theoretical. * * When a customer who is running the free plugin activates the premium one, * WordPress includes BOTH main files in that single request before Freemius * deactivates the free copy. Two unguarded declarations of the same function * is an immediate "Cannot redeclare" fatal — a white screen on the * customer's site at the precise moment they finish paying, which is the * worst possible time to break. * * Whichever copy wins the race is harmless: the body is byte-identical in * both builds, and it keys off the ADNVAA_PREMIUM_BUILD constant, which the * premium bootstrap defines regardless of which file declared the function. * * Found 2026-07-19 by activating both builds in one real WordPress install. */ function adnvaa_is_pro() { if ( !defined( 'ADNVAA_PREMIUM_BUILD' ) ) { return false; } return adnvaa_fs()->is_paying_or_trial(); } } register_activation_hook( __FILE__, array('ADNVAA_Store', 'install') ); /* * Deactivation must stop the weekly crawl. Registered against ADNVAA_Uninstall * rather than ADNVAA_Monitor because this file is shared by both builds and * ADNVAA_Monitor does not exist in the free one — and the case that matters is * precisely the mixed one: somebody runs Pro, the schedule exists, they later * revert to the free build, and nothing in the free build has ever heard of the * class that created it. Clearing by hook name is the only thing that works * from both sides. */ register_deactivation_hook( __FILE__, array('ADNVAA_Uninstall', 'clear_schedule') ); // Translations are loaded automatically by WordPress.org for hosted plugins; // calling load_plugin_textdomain() has been unnecessary since WP 4.6. add_action( 'plugins_loaded', array('ADNVAA_Store', 'maybe_upgrade') );