function after_register() { $_GET['level'] = get_usermeta($_GET['id'], 'reg_type'); $levels = rcp_get_subscription_levels('active'); $gateways = rcp_get_enabled_payment_gateways(); rcp_show_error_messages('register'); ?> <form id="rcp_registration_form" class="rcp_form" method="POST" action="<?php echo esc_url(rcp_get_current_url()); if (isset($_GET['id'])) { echo '?id=' . $_GET['id']; } ?> "> <div class="saloginwrapper"> <h2 class="section-title"><span>Successful Registration!</span></h2> <div class="clear"></div> <ul id="rcp_subscription_levels" style="display:none;"> <?php foreach ($levels as $key => $level) { ?> <?php if (rcp_show_subscription_level($level->id)) { ?> <li id="rcp_subscription_level_<?php echo $level->id; ?> " class="rcp_subscription_level"> <input type="radio" class="required rcp_level" <?php if (isset($_GET['level']) && $_GET['level'] == $level->id) { echo 'checked="checked"'; } ?> name="rcp_level" rel="<?php echo esc_attr($level->price); ?> " value="<?php echo esc_attr(absint($level->id)); ?> " <?php if ($level->duration == 0) { echo 'data-duration="forever"'; } ?> /> <span class="rcp_subscription_level_name"><?php echo rcp_get_subscription_name($level->id); ?> </span><span class="rcp_separator"> - </span><span class="rcp_price" rel="<?php echo esc_attr($level->price); ?> "><?php echo $level->price > 0 ? rcp_currency_filter($level->price) : __('free', 'rcp'); ?> <span class="rcp_separator"> - </span></span> <span class="rcp_level_duration"><?php echo $level->duration > 0 ? $level->duration . ' ' . rcp_filter_duration_unit($level->duration_unit, $level->duration) : __('unlimited', 'rcp'); ?> </span> <div class="rcp_level_description"> <?php echo rcp_get_subscription_description($level->id); ?> </div> </li> <?php } ?> <?php } ?> </ul> <?php $gateways = rcp_get_enabled_payment_gateways(); if (count($gateways) > 1) { $display = rcp_has_paid_levels() ? '' : ' style="display: none;"'; ?> <fieldset class="rcp_gateways_fieldset"> <p> <label><?php _e('Choose Your Payment Method', 'rcp'); ?> </label> </p> <p id="rcp_payment_gateways"<?php echo $display; ?> > <select name="rcp_gateway" id="rcp_gateway" style="float:left; position:relative;"> <?php foreach ($gateways as $key => $gateway) { ?> <option value="<?php echo esc_attr($key); ?> "><?php echo esc_html($gateway); ?> </option> <?php } ?> </select> </p> </fieldset> <?php } ?> <?php do_action('rcp_before_registration_submit_field', $levels); ?> <p id="rcp_submit_wrap"> <input type="hidden" name="rcp_register_nonce" value="<?php echo wp_create_nonce('rcp-register-nonce'); ?> "/> <input type="submit" name="rcp_submit_registration" id="rcp_submit" value="<?php echo apply_filters('rcp_registration_register_button', __('Register', 'rcp')); ?> "/> </p> <div class="clear"></div> </div></form> <?php }
</fieldset> <?php } ?> <?php do_action('rcp_after_register_form_fields'); ?> <?php if ($level->price > '0') { ?> <div class="rcp_gateway_fields"> <?php $gateways = rcp_get_enabled_payment_gateways(); if (count($gateways) > 1) { $display = rcp_has_paid_levels() ? '' : ' style="display: none;"'; ?> <fieldset class="rcp_gateways_fieldset"> <p id="rcp_payment_gateways"<?php echo $display; ?> > <select name="rcp_gateway" id="rcp_gateway"> <?php foreach ($gateways as $key => $gateway) { $recurring = rcp_gateway_supports($key, 'recurring') ? 'yes' : 'no'; ?> <option value="<?php echo esc_attr($key);
/** * Displays the system info report * * @since 2.5 * @return string $return The compiled system info report. */ function rcp_tools_system_info_report() { global $rcp_options, $wpdb; // Get theme info $theme_data = wp_get_theme(); $theme = $theme_data->Name . ' ' . $theme_data->Version; $return = '### Begin System Info ###' . "\n\n"; // Start with the basics... $return .= '-- Site Info' . "\n\n"; $return .= 'Site URL: ' . site_url() . "\n"; $return .= 'Home URL: ' . home_url() . "\n"; $return .= 'Multisite: ' . (is_multisite() ? 'Yes' : 'No') . "\n"; // WordPress configuration $return .= "\n" . '-- WordPress Configuration' . "\n\n"; $return .= 'Version: ' . get_bloginfo('version') . "\n"; $return .= 'Language: ' . (defined('WPLANG') && WPLANG ? WPLANG : 'en_US') . "\n"; $return .= 'Permalink Structure: ' . (get_option('permalink_structure') ? get_option('permalink_structure') : 'Default') . "\n"; $return .= 'Active Theme: ' . $theme . "\n"; $return .= 'Show On Front: ' . get_option('show_on_front') . "\n"; // Only show page specs if frontpage is set to 'page' if (get_option('show_on_front') === 'page') { $front_page_id = get_option('page_on_front'); $blog_page_id = get_option('page_for_posts'); $return .= 'Page On Front: ' . ($front_page_id != 0 ? get_the_title($front_page_id) . ' (#' . $front_page_id . ')' : 'Unset') . "\n"; $return .= 'Page For Posts: ' . ($blog_page_id != 0 ? get_the_title($blog_page_id) . ' (#' . $blog_page_id . ')' : 'Unset') . "\n"; } $return .= 'ABSPATH: ' . ABSPATH . "\n"; $return .= 'Table Prefix: ' . 'Length: ' . strlen($wpdb->prefix) . ' Status: ' . (strlen($wpdb->prefix) > 16 ? 'ERROR: Too long' : 'Acceptable') . "\n"; $return .= 'WP_DEBUG: ' . (defined('WP_DEBUG') ? WP_DEBUG ? 'Enabled' : 'Disabled' : 'Not set') . "\n"; $return .= 'Memory Limit: ' . WP_MEMORY_LIMIT . "\n"; $return .= 'Registered Post Stati: ' . implode(', ', get_post_stati()) . "\n"; // RCP Config $auto_renew_options = array(1 => 'Always auto renew', 2 => 'Never auto renew', 3 => 'Let customer choose whether to auto renew'); $return .= "\n" . '-- RCP Configuration' . "\n\n"; $return .= 'Version: ' . RCP_PLUGIN_VERSION . "\n"; $return .= 'License Key: ' . (!empty($rcp_options['license_key']) ? $rcp_options['license_key'] . "\n" : "Not set\n"); $return .= 'Auto Renew: ' . (!empty($rcp_options['auto_renew']) && array_key_exists($rcp_options['auto_renew'], $auto_renew_options) ? $auto_renew_options[$rcp_options['auto_renew']] . "\n" : "Invalid Configuration\n"); $return .= 'Currency: ' . (!empty($rcp_options['currency']) ? $rcp_options['currency'] . "\n" : "Invalid Configuration\n"); $return .= 'Currency Position: ' . (!empty($rcp_options['currency_position']) ? $rcp_options['currency_position'] . "\n" : "Invalid Configuration\n"); $return .= 'Sandbox Mode: ' . (rcp_is_sandbox() ? "True" . "\n" : "False\n"); // RCP pages $return .= "\n" . '-- RCP Page Configuration' . "\n\n"; $return .= 'Registration Page: ' . (!empty($rcp_options['registration_page']) ? get_permalink($rcp_options['registration_page']) . "\n" : "Unset\n"); $return .= 'Success Page: ' . (!empty($rcp_options['redirect']) ? get_permalink($rcp_options['redirect']) . "\n" : "Unset\n"); $return .= 'Account Page: ' . (!empty($rcp_options['account_page']) ? get_permalink($rcp_options['account_page']) . "\n" : "Unset\n"); $return .= 'Edit Profile Page: ' . (!empty($rcp_options['edit_profile']) ? get_permalink($rcp_options['edit_profile']) . "\n" : "Unset\n"); $return .= 'Update Billing Card Page: ' . (!empty($rcp_options['update_card']) ? get_permalink($rcp_options['update_card']) . "\n" : "Unset\n"); // RCP gateways $return .= "\n" . '-- RCP Gateway Configuration' . "\n\n"; $active_gateways = rcp_get_enabled_payment_gateways(); if ($active_gateways) { $gateways = array(); foreach ($active_gateways as $key => $label) { $gateways[] = $label . ' (' . $key . ')'; } $return .= 'Enabled Gateways: ' . implode(', ', $gateways) . "\n"; } else { $return .= 'Enabled Gateways: None' . "\n"; } // RCP Misc Settings $return .= "\n" . '-- RCP Misc Settings' . "\n\n"; $return .= 'Hide Premium Posts: ' . (!empty($rcp_options['hide_premium']) ? "True\n" : "False\n"); $return .= 'Redirect Page: ' . (!empty($rcp_options['redirect_from_premium']) ? get_permalink($rcp_options['redirect_from_premium']) . "\n" : "Unset\n"); $return .= 'Redirect Default Login URL ' . (!empty($rcp_options['hijack_login_url']) ? "True\n" : "False\n"); $return .= 'Login Page: ' . (!empty($rcp_options['login_redirect']) ? get_permalink($rcp_options['login_redirect']) . "\n" : "Unset\n"); $return .= 'Prevent Account Sharing: ' . (!empty($rcp_options['no_login_sharing']) ? "True\n" : "False\n"); $return .= 'Email IPN Reports: ' . (!empty($rcp_options['email_ipn_reports']) ? "True\n" : "False\n"); $return .= 'Disable Form CSS: ' . (!empty($rcp_options['disable_css']) ? "True\n" : "False\n"); $return .= 'Enable reCaptcha: ' . (!empty($rcp_options['enable_recaptcha']) ? "True\n" : "False\n"); $return .= 'reCaptcha Site Key: ' . (!empty($rcp_options['recaptcha_public_key']) ? "Set\n" : "Unset\n"); $return .= 'reCaptcha Secret Key: ' . (!empty($rcp_options['recaptcha_private_key']) ? "Set\n" : "Unset\n"); // RCP Templates $dir = get_stylesheet_directory() . '/rcp/'; if (is_dir($dir) && count(glob("{$dir}/*")) !== 0) { $return .= "\n" . '-- RCP Template Overrides' . "\n\n"; foreach (glob($dir . '/*') as $file) { $return .= 'Filename: ' . basename($file) . "\n"; } } // Get plugins that have an update $updates = get_plugin_updates(); // Must-use plugins // NOTE: MU plugins can't show updates! $muplugins = get_mu_plugins(); if (count($muplugins > 0)) { $return .= "\n" . '-- Must-Use Plugins' . "\n\n"; foreach ($muplugins as $plugin => $plugin_data) { $return .= $plugin_data['Name'] . ': ' . $plugin_data['Version'] . "\n"; } } // WordPress active plugins $return .= "\n" . '-- WordPress Active Plugins' . "\n\n"; $plugins = get_plugins(); $active_plugins = get_option('active_plugins', array()); foreach ($plugins as $plugin_path => $plugin) { if (!in_array($plugin_path, $active_plugins)) { continue; } $update = array_key_exists($plugin_path, $updates) ? ' (needs update - ' . $updates[$plugin_path]->update->new_version . ')' : ''; $return .= $plugin['Name'] . ': ' . $plugin['Version'] . $update . "\n"; } // WordPress inactive plugins $return .= "\n" . '-- WordPress Inactive Plugins' . "\n\n"; foreach ($plugins as $plugin_path => $plugin) { if (in_array($plugin_path, $active_plugins)) { continue; } $update = array_key_exists($plugin_path, $updates) ? ' (needs update - ' . $updates[$plugin_path]->update->new_version . ')' : ''; $return .= $plugin['Name'] . ': ' . $plugin['Version'] . $update . "\n"; } if (is_multisite()) { // WordPress Multisite active plugins $return .= "\n" . '-- Network Active Plugins' . "\n\n"; $plugins = wp_get_active_network_plugins(); $active_plugins = get_site_option('active_sitewide_plugins', array()); foreach ($plugins as $plugin_path) { $plugin_base = plugin_basename($plugin_path); if (!array_key_exists($plugin_base, $active_plugins)) { continue; } $update = array_key_exists($plugin_path, $updates) ? ' (needs update - ' . $updates[$plugin_path]->update->new_version . ')' : ''; $plugin = get_plugin_data($plugin_path); $return .= $plugin['Name'] . ': ' . $plugin['Version'] . $update . "\n"; } } // Server configuration (really just versioning) $return .= "\n" . '-- Webserver Configuration' . "\n\n"; $return .= 'PHP Version: ' . PHP_VERSION . "\n"; $return .= 'MySQL Version: ' . $wpdb->db_version() . "\n"; $return .= 'Webserver Info: ' . $_SERVER['SERVER_SOFTWARE'] . "\n"; // PHP configuration $return .= "\n" . '-- PHP Configuration' . "\n\n"; $return .= 'Safe Mode: ' . (ini_get('safe_mode') ? 'Enabled' : 'Disabled' . "\n"); $return .= 'Memory Limit: ' . ini_get('memory_limit') . "\n"; $return .= 'Upload Max Size: ' . ini_get('upload_max_filesize') . "\n"; $return .= 'Post Max Size: ' . ini_get('post_max_size') . "\n"; $return .= 'Upload Max Filesize: ' . ini_get('upload_max_filesize') . "\n"; $return .= 'Time Limit: ' . ini_get('max_execution_time') . "\n"; $return .= 'Max Input Vars: ' . ini_get('max_input_vars') . "\n"; $return .= 'Display Errors: ' . (ini_get('display_errors') ? 'On (' . ini_get('display_errors') . ')' : 'N/A') . "\n"; // PHP extensions and such $return .= "\n" . '-- PHP Extensions' . "\n\n"; $return .= 'cURL: ' . (function_exists('curl_init') ? 'Supported' : 'Not Supported') . "\n"; $return .= 'fsockopen: ' . (function_exists('fsockopen') ? 'Supported' : 'Not Supported') . "\n"; $return .= 'SOAP Client: ' . (class_exists('SoapClient') ? 'Installed' : 'Not Installed') . "\n"; $return .= 'Suhosin: ' . (extension_loaded('suhosin') ? 'Installed' : 'Not Installed') . "\n"; $return .= "\n" . '### End System Info ###'; return $return; }