addQueryArgFilter('formlayer_pro_updater_filter_args'); // Show the text to install the license key add_filter('puc_manual_final_check_link-formlayer-pro', 'formlayer_pro_updater_check_link', 10, 1); if(wp_doing_ajax()){ \FormLayerPro\Ajax::hooks(); } \FormLayerPro\Integrations::init(); \FormLayerPro\Templates::init(); \FormLayerPro\Frontend::init(); \FormLayerPro\Emailer::init(); // Gutenberg block \FormLayerPro\Block::init(); if(is_admin()){ \FormLayerPro\Admin::init(); return; } } function formlayer_check_updates(){ $current_version = get_option('formlayer_pro_version'); $version = (int) str_replace('.', '', $current_version); // Is it first run ? if(empty($current_version)){ \FormLayerPro\Install::activate(); return; } // Till 1.0.3 we used to update free using the Pro version so we need to remove the scheduler if(wp_next_scheduled('check_plugin_updates-formlayer')){ wp_clear_scheduled_hook('check_plugin_updates-formlayer'); } update_option('formlayer_pro_version', FORMLAYER_PRO_VERSION); }