/** * Display plugin warnings and the registration ribbon */ function rublon2factor_no_settings_warning() { global $pagenow; $screen = get_current_screen(); if ($pagenow == 'plugins.php' || !empty($screen->base) && $screen->base == 'toplevel_page_rublon') { $installation_obstacles = array(); if (!RublonHelper::canPluginAttemptRegistration($installation_obstacles)) { if ($installation_obstacles[RublonHelper::INSTALL_OBSTACLE_PHP_VERSION_TOO_LOW]) { echo "<div class='error'><p><strong>" . __('Warning! The PHP version of your server is too old to run Rublon. Please upgrade your server\'s PHP version.', 'rublon') . '</strong></p><p>' . __('Required PHP version:', 'rublon') . ' <strong>' . RublonHelper::PHP_VERSION_REQUIRED . ' ' . __('(or above)', 'rublon') . '</strong></p><p>' . __('Your PHP version:', 'rublon') . ' <strong>' . phpversion() . '</strong></p></div>'; } if ($installation_obstacles[RublonHelper::INSTALL_OBSTACLE_CURL_NOT_AVAILABLE]) { echo "<div class='error'><p><strong>" . __('Warning! The cURL library has not been found on this server.', 'rublon') . '</strong> ' . __('It is a crucial component of the Rublon plugin and its absence will prevent it from working properly. Please have the cURL library installed or consult your server administrator about it.', 'rublon') . '</p></div>'; } if ($installation_obstacles[RublonHelper::INSTALL_OBSTACLE_HASH_NOT_AVAILABLE]) { echo "<div class='error'><p><strong>" . __('Warning! The Hash PHP extension has not been found on this server.', 'rublon') . '</strong> ' . __('It is a crucial component of the Rublon plugin and its absence will prevent it from working properly. Please have the Hash extension installed or consult your server administrator about it.', 'rublon') . '</p></div>'; } } } }