/** * Stores the current settings errors in a transient and redirects. * * This method is used at the end of regular action requests so that the result * of the action is displayed on the actual settings page. * * @since 1.0.0 * @access protected * * @param boolean $network_wide Whether this is a network wide request. */ protected function store_and_redirect($network_wide = false) { $func = 'set_transient'; $query_arg = 'settings-updated'; if ($network_wide) { $func = 'set_site_transient'; $query_arg = 'updated'; } call_user_func($func, 'settings_errors', get_settings_errors(), 30); wp_redirect(add_query_arg($query_arg, 'true', App::get_admin_url($network_wide ? 'network' : 'site'))); exit; }
/** * Renders the Getting Started help tab for the plugin settings screen. * * @since 1.0.0 * @access public */ public function render_help_getting_started() { ?> <p><?php _e('To obtain your first SSL certificate, follow these steps:', 'wp-encrypt'); ?> </p> <ol> <li> <?php _e('Enter the information about your organization name, its country name and its two-letter country code.', 'wp-encrypt'); ?> <br /> <?php _e('Optionally adjust the additional settings to match your needs. The SSL certificates are valid for 90 days, so they need to be regenerated before they expire. Check the option to auto-generate the certificate if you would like to have the plugin take care of it automatically.', 'wp-encrypt'); ?> <br /> <?php _e('Hit the <em>Save Changes</em> button when you are done with the setup.', 'wp-encrypt'); ?> </li> <li> <?php _e('A new section will appear where you need to sign up for an account with Let’s Encrypt.', 'wp-encrypt'); ?> <?php _e('You do not need to worry about this account as it will only be used to generate the SSL certificates later.', 'wp-encrypt'); ?> <br /> <?php _e('Click on <em>Register Account</em> to sign up with the data you specified as account settings in the first step.', 'wp-encrypt'); ?> </li> <li> <?php _e('You should now be able to obtain your first SSL certificate. Hit the <em>Generate Certificate</em> button to let the plugin do its magic.', 'wp-encrypt'); ?> <?php if (is_multisite()) { ?> <br /> <?php _e('The certificate will automatically be generated for all sites in this network.', 'wp-encrypt'); ?> <?php if (App::is_multinetwork()) { ?> <?php _e('If you would like your certificate to also include all sites from the other networks, please check the <em>Global SSL Certificate</em> option.', 'wp-encrypt'); ?> <?php } ?> <?php } ?> </li> <li> <?php _e('After having generated the initial certificate, you need to set up SSL on your server (see the corresponding tab on the left for more information).', 'wp-encrypt'); ?> <br /> <?php _e('From now on, the certificate will be regenerated automatically, ten days before expiration, if you set the option accordingly. In any case, you will see a warning prior to expiration (which you can adjust as well), so you know when to take action.', 'wp-encrypt'); ?> </li> </ol> <?php }