%2$s

', $table ? (int) $table->get_column_count() : 3, esc_html( sprintf( /* translators: %s: the folder and file of the copy that runs, e.g. improveab-ab-testing/improveab-ab-testing.php. */ __( 'This copy is not running: another copy of ImproveAB is active (%s) and runs your tests. Deactivate this one; your tests, results and settings are shared and stay as they are.', 'improveab-ab-testing' ), $improveab_running ) ) ); } ); return; } define( 'IMPROVEAB_VERSION', '1.0.0' ); // Schema version, tracked independently of the public plugin version so that // dbDelta and migrations only run when the database structure actually changes. // Bump this (not the plugin version) whenever a table or column is added. define( 'IMPROVEAB_DB_VERSION', '1.0.0' ); // Version of the data contract: the test/event schema, hook surface, // localStorage keys, and event/handoff payloads documented in CONTRACTS.md. // Code that reads this data through those hooks can check it. Bump only on // a breaking change to that contract, never casually. define( 'IMPROVEAB_DATA_CONTRACT', '1' ); // Which edition this build is. Both run the same tables and options, and a // site moves between them by replacing the plugin's files, so caches that // hold what the visitor runtime receives are stamped with the edition too // (IMPROVEAB_BUILD), and the first request after a switch drops them // (ImproveAB_Install::maybe_upgrade()). define( 'IMPROVEAB_EDITION', 'free' ); define( 'IMPROVEAB_BUILD', IMPROVEAB_VERSION . '-' . IMPROVEAB_EDITION ); define( 'IMPROVEAB_FILE', __FILE__ ); define( 'IMPROVEAB_DIR', plugin_dir_path( __FILE__ ) ); define( 'IMPROVEAB_URL', plugin_dir_url( __FILE__ ) ); /** * The capability that lets a user create, run and read tests. Administrators * always have it (granted to the role on install); any role a site grants it * to gets the same. Settings stay behind manage_options regardless. */ define( 'IMPROVEAB_CAP', 'improveab_manage_tests' ); require_once IMPROVEAB_DIR . 'includes/functions.php'; require_once IMPROVEAB_DIR . 'includes/class-improveab-install.php'; require_once IMPROVEAB_DIR . 'includes/class-improveab-settings.php'; require_once IMPROVEAB_DIR . 'includes/class-improveab-cache.php'; require_once IMPROVEAB_DIR . 'includes/class-improveab-tests.php'; require_once IMPROVEAB_DIR . 'includes/class-improveab-stats.php'; require_once IMPROVEAB_DIR . 'includes/class-improveab-rest.php'; require_once IMPROVEAB_DIR . 'includes/class-improveab-render.php'; require_once IMPROVEAB_DIR . 'includes/class-improveab-admin.php'; register_activation_hook( __FILE__, array( 'ImproveAB_Install', 'activate' ) ); register_deactivation_hook( __FILE__, array( 'ImproveAB_Install', 'deactivate' ) ); add_action( 'improveab_rollup', array( 'ImproveAB_Install', 'rollup' ) ); add_action( 'improveab_tally', array( 'ImproveAB_Install', 'tally' ) ); add_filter( 'cron_schedules', array( 'ImproveAB_Install', 'cron_schedules' ) ); // A deleted network site's tables go with it. add_filter( 'wpmu_drop_tables', array( 'ImproveAB_Install', 'drop_tables' ), 10, 2 ); add_action( 'plugins_loaded', 'improveab_init' ); /* * Translations: WordPress loads language packs for wp.org-hosted plugins * automatically (since 4.6), so no load_plugin_textdomain() call is needed. * The /languages folder ships the .pot template for translators. */ add_action( 'before_woocommerce_init', 'improveab_declare_wc_compat' );