/**
  * Check for GP Pro being active.
  *
  * @return void
  */
 public function gppro_active_check()
 {
     // First make sure we have our function.
     if (!function_exists('get_current_screen')) {
         return;
     }
     // Get the current screen.
     $screen = get_current_screen();
     // Bail if not on the plugins page.
     if (empty($screen) || !is_object($screen) || 'plugins.php' !== $screen->parent_file) {
         return;
     }
     // Run the active check.
     $coreactive = class_exists('Genesis_Palette_Pro') ? Genesis_Palette_Pro::check_active() : false;
     // Active. bail.
     if ($coreactive) {
         return;
     }
     // Set my text.
     $text = esc_html__('This plugin requires Genesis Design Palette Pro to function and cannot be activated.', 'gp-pro-freeform-style');
     // Not active. show message.
     echo wp_kses_post('<div id="message" class="error fade below-h2"><p><strong>' . $text . '</strong></p></div>');
     // Hide activation method.
     unset($_GET['activate']);
     // Deactivate the plugin.
     deactivate_plugins(plugin_basename(__FILE__));
     // And finish.
     return;
 }
 /**
  * check for GP Pro being active
  *
  * @return GP_Pro_Export_CSS
  */
 public function gppro_active_check()
 {
     // get the current screen
     $screen = get_current_screen();
     // bail if not on the plugins page
     if (is_object($screen) && $screen->parent_file !== 'plugins.php') {
         return;
     }
     // run the active check
     $coreactive = class_exists('Genesis_Palette_Pro') ? Genesis_Palette_Pro::check_active() : false;
     // active. bail
     if ($coreactive) {
         return;
     }
     // not active. show message
     echo '<div id="message" class="error fade below-h2"><p><strong>' . __(sprintf('This plugin requires Genesis Design Palette Pro to function and cannot be activated.'), 'gppro-export-css') . '</strong></p></div>';
     // hide activation method
     unset($_GET['activate']);
     // deactivate the plugin
     deactivate_plugins(plugin_basename(__FILE__));
     // and finish
     return;
 }
 /**
  * Check for GP Pro being active.
  *
  * @return HTML message or nothing.
  */
 public function gppro_active_check()
 {
     // Make sure the function exists.
     if (!function_exists('get_current_screen')) {
         return;
     }
     // Get the current screen.
     $screen = get_current_screen();
     // Bail if not on the plugins page.
     if (!is_object($screen) || empty($screen->parent_file) || 'plugins.php' !== esc_attr($screen->parent_file)) {
         return;
     }
     // Run the active check.
     $coreactive = class_exists('Genesis_Palette_Pro') ? Genesis_Palette_Pro::check_active() : false;
     // Active. bail.
     if ($coreactive) {
         return;
     }
     // Not active. Show message.
     echo '<div id="message" class="notice settings-error is-dismissible gppro-admin-warning"><p><strong>' . esc_html__('This plugin requires Genesis Design Palette Pro to function and cannot be activated.', 'gppro-entry-content') . '</strong></p></div>';
     // Hide activation method.
     unset($_GET['activate']);
     // Deactivate the plugin.
     deactivate_plugins(plugin_basename(__FILE__));
     // And finish.
     return;
 }
 /**
  * check for GP Pro being active
  *
  * @return GP_Pro_Widget_Enews
  */
 public function gppro_active_check()
 {
     // Confirm we are on the correct screen to check.
     if (class_exists('GP_Pro_Utilities') && false === ($check = GP_Pro_Utilities::check_current_dpp_screen('plugins.php'))) {
         return;
     }
     // Confirm that DPP isn't active before proceeding.
     if (class_exists('Genesis_Palette_Pro') && false !== ($active = Genesis_Palette_Pro::check_active())) {
         return;
     }
     // DPP is not active. show message.
     echo '<div id="message" class="error notice is-dismissible"><p><strong>' . __(sprintf('This plugin requires Genesis Design Palette Pro to function and cannot be activated.'), 'gpwen') . '</strong></p></div>';
     // Hide activation method.
     unset($_GET['activate']);
     // Deactivate the plugin.
     deactivate_plugins(plugin_basename(__FILE__));
     // And finish.
     return;
 }