/** * Setting up the license manager * * @since 3.0 */ protected function setup_license_manager() { $license_manager = new MI_Plugin_License_Manager($this); $license_manager->setup_hooks(); add_filter('yst_ga_extension_status', array($this, 'filter_extension_is_active'), 10, 1); add_action('yst_ga_show_license_form', array($this, 'action_show_license_form')); $this->license_manager = $license_manager; }
/** * Shows license page */ public function show_license_page() { // Instantiate license class $license_manager = new MI_Plugin_License_Manager(new Sample_Product()); ?> <div class="wrap"> <?php //settings_errors(); ?> <?php $license_manager->show_license_form(false); ?> </div> <?php }
/** * Render the admin page footer with sidebar for the GA Plugin */ public function content_footer() { do_action('yoast_ga_admin_footer'); if (class_exists('MI_Product_GA_Premium')) { $license_manager = new MI_Plugin_License_Manager(new MI_Product_GA_Premium()); if ($license_manager->license_is_valid()) { return; } } $banners = array(); $banners[] = array('url' => 'https://optinmonster.com/?utm_source=monsterinsights-config&utm_medium=banner&utm_campaign=gaplugin', 'banner' => $this->plugin_url . 'assets/img/omupsell.png', 'title' => 'Convert Visitors into Subscribers'); $banners[] = array('url' => 'https://www.monsterinsights.com/pricing/?utm_source=monsterinsights-config&utm_medium=banner&utm_campaign=gaplugin', 'banner' => $this->plugin_url . 'assets/img/upgradetopro.png', 'title' => 'Get the premium version of Google Analytics by MonsterInsights!'); $banners[] = array('url' => 'http://www.wpbeginner.net/?utm_source=monsterinsights-config&utm_medium=banner&utm_campaign=gaplugin', 'banner' => $this->plugin_url . 'assets/img/wpbeginnerupsell.png', 'title' => 'The best collection of free beginner WordPress resources!'); $banners[] = array('url' => 'https://wpforms.com/pricing/?utm_source=monsterinsights-config&utm_medium=banner&utm_campaign=gaplugin', 'banner' => $this->plugin_url . 'assets/img/wpformsupsell.png', 'title' => 'Get the most beginner friendly WordPress contact form plugin in the market!'); shuffle($banners); require 'views/content-footer.php'; }