wp_enqueue_style(AADSSO, AADSSO_PLUGIN_URL . '/login.css'); } /** * Renders the link used to initiate the login to Azure AD. */ function print_login_link() { $html = '<p class="aadsso-login-form-text">'; $html .= '<a href="%s">'; $html .= sprintf(__('Sign in with your %s account', AADSSO), htmlentities($this->settings->org_display_name)); $html .= '</a><br /><a class="dim" href="%s">' . __('Sign out', AADSSO) . '</a></p>'; printf($html, $this->get_login_url(), $this->get_logout_url()); } } // Load settings JSON contents from DB and initialize the plugin $aadsso_settings_instance = AADSSO_Settings::init(); $aadsso = AADSSO::get_instance($aadsso_settings_instance); /*** Utility functions ***/ if (!function_exists('com_create_guid')) { /** * Generates a globally unique identifier ( Guid ). * * @return string A new random globally unique identifier. */ function com_create_guid() { mt_srand((double) microtime() * 10000); $charid = strtoupper(md5(uniqid(rand(), true))); $hyphen = chr(45); // "-" $uuid = chr(123) . substr($charid, 0, 8) . $hyphen . substr($charid, 8, 4) . $hyphen . substr($charid, 12, 4) . $hyphen . substr($charid, 16, 4) . $hyphen . substr($charid, 20, 12) . chr(125);