/** * Main Instance * * @staticvar array $instance * @return The one true instance */ public static function instance() { if (!isset(self::$instance)) { self::$instance = new self(); self::$instance->actions(); self::$instance->parent = CUSTOMLOGIN(); } return self::$instance; }
/** * Display Upgrade Notices * * @access private * @since 3.0.3 * @return void */ public function upgrade_notices() { $show_upgrade_notice = false; // Version < 2.0 if (false !== get_option('custom_login_settings', false)) { $show_upgrade_notice = true; } // Version > 2.0 if (false !== get_option('custom_login', false)) { $show_upgrade_notice = true; } if ($show_upgrade_notice && '' === get_option(CUSTOM_LOGIN_OPTION . '_general', '')) { remove_action('admin_notice', array(CL_Settings_Upgrade::instance(), 'upgrade_notices')); printf('<div class="error"><p>' . esc_html__('Custom Login has detected old settings. If you wish to use them please run %sthis%s script before making any changes below.', CUSTOM_LOGIN_DIRNAME) . '</p></div>', '<a href="' . esc_url(admin_url('options.php?page=custom-login-upgrades')) . '">', '</a>'); } }