本文整理汇总了PHP中c_ws_plugin__s2member_utils_urls::wp_register_url方法的典型用法代码示例。如果您正苦于以下问题:PHP c_ws_plugin__s2member_utils_urls::wp_register_url方法的具体用法?PHP c_ws_plugin__s2member_utils_urls::wp_register_url怎么用?PHP c_ws_plugin__s2member_utils_urls::wp_register_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类c_ws_plugin__s2member_utils_urls
的用法示例。
在下文中一共展示了c_ws_plugin__s2member_utils_urls::wp_register_url方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: register
/**
* Handles Registration Links.
*
* @package s2Member\Registrations
* @since 3.5
*
* @attaches-to ``add_action("init");``
*
* @return null Or exits script execution after redirection.
*/
public static function register()
{
do_action("ws_plugin__s2member_before_register", get_defined_vars());
/**/
if (!empty($_GET["s2member_register"])) {
eval('while (@ob_end_clean ());');
/* First we end/clean any output buffers that may exist already. */
/**/
$msg_503 = _x('<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.', "s2member-front", "s2member");
/**/
if (is_array($register = preg_split("/\\:\\.\\:\\|\\:\\.\\:/", c_ws_plugin__s2member_utils_encryption::decrypt(trim(stripslashes((string) $_GET["s2member_register"])))))) {
if (count($register) === 6 && $register[0] === "subscr_gateway_subscr_id_custom_item_number_time") {
if (is_numeric($register[5]) && $register[5] <= strtotime("now") && $register[5] >= strtotime("-" . apply_filters("ws_plugin__s2member_register_link_exp_time", "2 days", get_defined_vars()))) {
$_COOKIE["s2member_subscr_gateway"] = c_ws_plugin__s2member_utils_encryption::encrypt($register[1]);
$_COOKIE["s2member_subscr_id"] = c_ws_plugin__s2member_utils_encryption::encrypt($register[2]);
$_COOKIE["s2member_custom"] = c_ws_plugin__s2member_utils_encryption::encrypt($register[3]);
$_COOKIE["s2member_item_number"] = c_ws_plugin__s2member_utils_encryption::encrypt($register[4]);
/**/
if (($reg_cookies = c_ws_plugin__s2member_register_access::reg_cookies_ok()) && extract($reg_cookies)) {
status_header(200);
/* Send a 200 OK status header. */
header("Content-Type: text/html; charset=utf-8");
/* Content-Type with UTF-8. */
/**/
setcookie("s2member_subscr_gateway", $_COOKIE["s2member_subscr_gateway"], time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("s2member_subscr_gateway", $_COOKIE["s2member_subscr_gateway"], time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
setcookie("s2member_subscr_id", $_COOKIE["s2member_subscr_id"], time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("s2member_subscr_id", $_COOKIE["s2member_subscr_id"], time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
setcookie("s2member_custom", $_COOKIE["s2member_custom"], time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("s2member_custom", $_COOKIE["s2member_custom"], time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
setcookie("s2member_item_number", $_COOKIE["s2member_item_number"], time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("s2member_item_number", $_COOKIE["s2member_item_number"], time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
/**/
do_action("ws_plugin__s2member_during_register", get_defined_vars());
/**/
if (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site() && ($location = c_ws_plugin__s2member_utils_urls::wp_signup_url())) {
echo '<script type="text/javascript">' . "\n";
echo "window.location = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq($location) . "';";
echo '</script>' . "\n";
} else {
if ($location = c_ws_plugin__s2member_utils_urls::wp_register_url()) {
echo '<script type="text/javascript">' . "\n";
echo "window.location = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq($location) . "';";
echo '</script>' . "\n";
}
}
exit;
/* Clean exit. The browser will now be redirected to ``$location``. */
} else {
status_header(503) . header("Content-Type: text/html; charset=utf-8") . exit($msg_503);
}
} else {
status_header(503) . header("Content-Type: text/html; charset=utf-8") . exit($msg_503);
}
} else {
status_header(503) . header("Content-Type: text/html; charset=utf-8") . exit($msg_503);
}
} else {
status_header(503) . header("Content-Type: text/html; charset=utf-8") . exit($msg_503);
}
}
/**/
do_action("ws_plugin__s2member_after_register", get_defined_vars());
}
示例2: __construct
//.........这里部分代码省略.........
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_email_config", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_open_registration", TRUE, get_defined_vars())) {
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_open_registration", get_defined_vars());
if (is_multisite() && is_main_site()) {
echo '<div class="ws-menu-page-group" title="Open Registration">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-open-registration-section">' . "\n";
echo '<h3>Open Registration / Free Subscribers (optional)</h3>' . "\n";
echo '<p>On the Main Site of a Multisite Network, the settings for Open Registration are consolidated into the <code>s2Member -› Multisite (Config)</code> panel.</p>' . "\n";
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_open_registration", get_defined_vars());
echo '</div>' . "\n";
echo '</div>' . "\n";
} else {
echo '<div class="ws-menu-page-group" title="Open Registration">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-open-registration-section">' . "\n";
echo '<h3>Open Registration / Free Subscribers (optional)</h3>' . "\n";
echo '<p>s2Member supports Free Subscribers (at Level #0), along with four Primary Levels [1-4] of paid Membership. If you want your visitors to be capable of registering absolutely free, you will want to "allow" Open Registration. Whenever a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0.</p>' . "\n";
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_open_registration", get_defined_vars());
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-allow-subscribers-in">' . "\n";
echo 'Allow Open Registration? (Free Subscribers)' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<select name="ws_plugin__s2member_allow_subscribers_in" id="ws-plugin--s2member-allow-subscribers-in">' . "\n";
echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["allow_subscribers_in"] ? ' selected="selected"' : '') . '>No (do NOT allow Open Registration)</option>' . "\n";
echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["allow_subscribers_in"] ? ' selected="selected"' : '') . '>Yes (allow Open Registration; Free Subscribers at Level #0)</option>' . "\n";
echo '</select><br />' . "\n";
echo 'If you set this to <code>Yes</code>, you\'re unlocking <a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::wp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Standard Registration Form.\\n* s2Member makes this form available to logged-in Administrators, at all times (for testing purposes), regardless of configuration.' . (c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">/wp-login.php?action=register</a>. When a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0. The s2Member software reserves Level #0; to be used ONLY for Free Subscribers. All other Membership Levels [1-4] require payment.' . "\n";
echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<br /><br /><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form <a href="' . esc_attr(c_ws_plugin__s2member_utils_urls::bp_register_url()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your BuddyPress Registration Form.\\n* However, you will probably be redirected away from this BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.\');">here</a>.<br />s2Member integrates with BuddyPress, and the above setting will control Open Regisration for BuddyPress too.</em>' . "\n" : '';
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
}
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_open_registration", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_membership_levels", TRUE, get_defined_vars())) {
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_membership_levels", get_defined_vars());
echo '<div class="ws-menu-page-group" title="Membership Levels/Labels">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-membership-levels-section">' . "\n";
echo '<h3>Membership Levels (required, please customize these)</h3>' . "\n";
echo '<p>The default Membership Levels are labeled generically; feel free to modify them as needed. s2Member supports Free Subscribers <em>(at Level #0)</em>, along with several Primary Roles for paid Membership <em>(i.e. Levels 1-4)</em>, created by the s2Member plugin.' . (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? ' s2Member also supports unlimited Custom Capability Packages <em>(see <code>s2Member -› API Scripting -› Custom Capabilities</code>)</em>' : '') . '. That being said, you don\'t have to use all of the Membership Levels if you don\'t want to. To use only 1 or 2 of these Levels, just design your Membership Options Page, so it only includes Payment Buttons for the Levels being used.</p>' . "\n";
echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p><em><strong>TIP:</strong> <strong>Unlimited Membership Levels</strong> are only possible with <a href="' . esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Pro Module / Prices")) . '" target="_blank" rel="external">s2Member Pro</a>. However, Custom Capabilities are possible in all versions of s2Member, including the free version. Custom Capabilities are a great way to extend s2Member in creative ways. If you\'re an advanced site owner, a theme designer, or a web developer integrating s2Member for a client, please check your Dashboard, under: <code>s2Member -› API Scripting -› Custom Capabilities</code>. We also recommend <a href="http://www.s2member.com/videos/A2C07377CF60025E/" target="_blank" rel="external">this video tutorial</a>.</em></p>' . "\n" : '';
echo !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site() ? '<p><strong>See also:</strong> These KB articles: <a href="http://www.s2member.com/kb/roles-caps/" target="_blank" rel="external">s2Member Roles/Capabilities</a> and <a href="http://www.s2member.com/kb/simple-shortcode-conditionals/" target="_blank" rel="external">Simple Shortcode Conditionals</a>.</p>' . "\n" : '';
do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_membership_levels", get_defined_vars());
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
echo '<tr>' . "\n";
echo '<th>' . "\n";
echo '<label for="ws-plugin--s2member-level' . $n . '-label">' . "\n";
echo $n === 0 ? 'Level #' . $n . ' <em>(Free Subscribers)</em>:' . "\n" : 'Level #' . $n . ' Members:' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_label" id="ws-plugin--s2member-level' . $n . '-label" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"]) . '" /><br />' . "\n";
示例3: cp
//.........这里部分代码省略.........
// Housekeeping.
} else {
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action('ws_plugin__s2member_during_paypal_return_before_subscr_signup_wo_update_vars', get_defined_vars());
unset($__refs, $__v);
$processing = $during = TRUE;
// Yes, we ARE processing this new Subscription request.
$paypal['s2member_log'][] = 's2Member `txn_type` identified as ( `web_accept|subscr_signup|subscr_payment` ) w/o update vars.';
setcookie('s2member_subscr_gateway', $s2member_subscr_gateway = c_ws_plugin__s2member_utils_encryption::encrypt($paypal['subscr_gateway']), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie('s2member_subscr_gateway', $s2member_subscr_gateway, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE['s2member_subscr_gateway'] = $s2member_subscr_gateway);
setcookie('s2member_subscr_id', $s2member_subscr_id = c_ws_plugin__s2member_utils_encryption::encrypt($paypal['subscr_id']), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie('s2member_subscr_id', $s2member_subscr_id, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE['s2member_subscr_id'] = $s2member_subscr_id);
setcookie('s2member_custom', $s2member_custom = c_ws_plugin__s2member_utils_encryption::encrypt($paypal['custom']), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie('s2member_custom', $s2member_custom, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE['s2member_custom'] = $s2member_custom);
setcookie('s2member_item_number', $s2member_item_number = c_ws_plugin__s2member_utils_encryption::encrypt($paypal['item_number']), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie('s2member_item_number', $s2member_item_number, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE['s2member_item_number'] = $s2member_item_number);
$paypal['s2member_log'][] = 'Registration Cookies set on ( `web_accept|subscr_signup|subscr_payment` ) w/o update vars.';
setcookie('s2member_tracking', $s2member_tracking = c_ws_plugin__s2member_utils_encryption::encrypt($paypal['subscr_id']), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie('s2member_tracking', $s2member_tracking, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE['s2member_tracking'] = $s2member_tracking);
$paypal['s2member_log'][] = 'Transient Tracking Cookie set on ( `web_accept|subscr_signup|subscr_payment` ) w/o update vars.';
if ($processing && $tracking_properties && ($code = $GLOBALS['WS_PLUGIN__']['s2member']['o']['signup_tracking_codes'])) {
if (($code = c_ws_plugin__s2member_utils_strings::fill_cvs($code, $paypal['custom'])) && ($code = preg_replace('/%%subscr_id%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_id']), $code))) {
if (($code = preg_replace('/%%subscr_baid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_baid']), $code)) && ($code = preg_replace('/%%subscr_cid%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['subscr_cid']), $code))) {
if (($code = preg_replace('/%%currency%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency']), $code)) && ($code = preg_replace('/%%currency_symbol%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['currency_symbol']), $code))) {
if (($code = preg_replace('/%%initial%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial']), $code)) && ($code = preg_replace('/%%regular%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular']), $code)) && ($code = preg_replace('/%%recurring%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['recurring']), $code))) {
if (($code = preg_replace('/%%initial_term%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['initial_term']), $code)) && ($code = preg_replace('/%%regular_term%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['regular_term']), $code))) {
if (($code = preg_replace('/%%item_number%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['item_number']), $code)) && ($code = preg_replace('/%%item_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['item_name']), $code))) {
if (($code = preg_replace('/%%first_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['first_name']), $code)) && ($code = preg_replace('/%%last_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['last_name']), $code))) {
if ($code = preg_replace('/%%full_name%%/i', c_ws_plugin__s2member_utils_strings::esc_refs(trim($paypal['first_name'] . ' ' . $paypal['last_name'])), $code)) {
if ($code = preg_replace('/%%payer_email%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['payer_email']), $code)) {
if ($code = preg_replace('/%%user_ip%%/i', c_ws_plugin__s2member_utils_strings::esc_refs($paypal['ip']), $code)) {
if ($code = trim(preg_replace('/%%(.+?)%%/i', '', $code))) {
$paypal['s2member_log'][] = 'Storing Signup Tracking Codes into a Transient Queue. These will be processed on-site.';
set_transient('s2m_' . md5('s2member_transient_signup_tracking_codes_' . $paypal['subscr_id']), $code, 43200);
}
}
}
}
}
}
}
}
}
}
}
}
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action('ws_plugin__s2member_during_paypal_return_during_subscr_signup_wo_update_vars', get_defined_vars());
unset($__refs, $__v);
// Housekeeping.
if (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site()) {
if ($redirection_url_after_mms_farm_signup = apply_filters('ws_plugin__s2member_redirection_url_after_mms_farm_signup', FALSE, get_defined_vars())) {
$paypal['s2member_log'][] = 'Redirecting Customer to a custom URL after signup: ' . $redirection_url_after_mms_farm_signup;
wp_redirect($redirection_url_after_mms_farm_signup);
} else {
if (!empty($custom_success_redirection)) {
$paypal['s2member_log'][] = 'Redirecting Customer to a custom URL on success: ' . $custom_success_redirection;
wp_redirect($custom_success_redirection);
} else {
$paypal['s2member_log'][] = 'Redirecting Customer to Signup Page (after displaying a quick thank-you message). They need to Signup/Register now.';
echo c_ws_plugin__s2member_return_templates::return_template($paypal['subscr_gateway'], _x('<strong>Thank you! Your account has been approved.<br />The next step is to Register a Username for immediate access.</strong>', 's2member-front', 's2member'), _x('Please Register Now (Click Here)', 's2member-front', 's2member'), c_ws_plugin__s2member_utils_urls::wp_signup_url());
}
}
} else {
if ($redirection_url_after_signup = apply_filters('ws_plugin__s2member_redirection_url_after_signup', FALSE, get_defined_vars())) {
$paypal['s2member_log'][] = 'Redirecting Customer to a custom URL after signup: ' . $redirection_url_after_signup;
wp_redirect($redirection_url_after_signup);
} else {
if (!empty($custom_success_redirection)) {
$paypal['s2member_log'][] = 'Redirecting Customer to a custom URL on success: ' . $custom_success_redirection;
wp_redirect($custom_success_redirection);
} else {
$paypal['s2member_log'][] = 'Redirecting Customer to Registration Page (after displaying a quick thank-you message). They need to Register now.';
echo c_ws_plugin__s2member_return_templates::return_template($paypal['subscr_gateway'], _x('<strong>Thank you! Your account has been approved.<br />The next step is to Register a Username for immediate access.</strong>', 's2member-front', 's2member'), _x('Please Register Now (Click Here)', 's2member-front', 's2member'), c_ws_plugin__s2member_utils_urls::wp_register_url());
}
}
}
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action('ws_plugin__s2member_during_paypal_return_after_subscr_signup_wo_update_vars', get_defined_vars());
unset($__refs, $__v);
// Housekeeping.
}
} else {
$paypal['s2member_log'][] = 'Page Expired. Duplicate Return-Data.';
$paypal['s2member_log'][] = 's2Member `txn_type` identified as ( `web_accept|subscr_signup|subscr_payment` ).';
$paypal['s2member_log'][] = 'Page Expired. Instructing customer to check their email for further details about how to obtain access to what they purchased.';
echo c_ws_plugin__s2member_return_templates::return_template($paypal['subscr_gateway'], '<strong>' . _x('Thank you! Please check your email for further details regarding your purchase.', 's2member-front', 's2member') . '</strong>', _x('Return to Home Page', 's2member-front', 's2member'), home_url("/"));
}
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action('ws_plugin__s2member_during_paypal_return_after_subscr_signup', get_defined_vars());
unset($__refs, $__v);
// Housekeeping.
return apply_filters('c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level', $paypal, get_defined_vars());
} else {
return apply_filters('c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level', FALSE, get_defined_vars());
}
}
示例4: cp
//.........这里部分代码省略.........
$paypal["s2member_log"][] = "Unable to modify Subscription. Could not get the existing User ID from the DB.";
$paypal["s2member_log"][] = "Redirecting Customer to the Home Page (after displaying an error message).";
echo c_ws_plugin__s2member_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />Could not get the existing User ID from the DB.', "s2member-front", "s2member"), _x("Back To Home Page", "s2member-front", "s2member"), home_url("/"));
}
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_paypal_return_after_subscr_signup_w_update_vars", get_defined_vars());
unset($__refs, $__v);
} else {
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_paypal_return_before_subscr_signup_wo_update_vars", get_defined_vars());
unset($__refs, $__v);
$processing = $during = true;
$paypal["s2member_log"][] = "s2Member `txn_type` identified as ( `web_accept|subscr_signup|subscr_payment` ) w/o update vars.";
setcookie("s2member_subscr_gateway", $s2member_subscr_gateway = c_ws_plugin__s2member_utils_encryption::encrypt($paypal["subscr_gateway"]), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("s2member_subscr_gateway", $s2member_subscr_gateway, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["s2member_subscr_gateway"] = $s2member_subscr_gateway);
setcookie("s2member_subscr_id", $s2member_subscr_id = c_ws_plugin__s2member_utils_encryption::encrypt($paypal["subscr_id"]), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("s2member_subscr_id", $s2member_subscr_id, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["s2member_subscr_id"] = $s2member_subscr_id);
setcookie("s2member_custom", $s2member_custom = c_ws_plugin__s2member_utils_encryption::encrypt($paypal["custom"]), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("s2member_custom", $s2member_custom, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["s2member_custom"] = $s2member_custom);
setcookie("s2member_item_number", $s2member_item_number = c_ws_plugin__s2member_utils_encryption::encrypt($paypal["item_number"]), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("s2member_item_number", $s2member_item_number, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["s2member_item_number"] = $s2member_item_number);
$paypal["s2member_log"][] = "Registration Cookies set on ( `web_accept|subscr_signup|subscr_payment` ) w/o update vars.";
setcookie("s2member_tracking", $s2member_tracking = c_ws_plugin__s2member_utils_encryption::encrypt($paypal["subscr_id"]), time() + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie("s2member_tracking", $s2member_tracking, time() + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["s2member_tracking"] = $s2member_tracking);
$paypal["s2member_log"][] = "Transient Tracking Cookie set on ( `web_accept|subscr_signup|subscr_payment` ) w/o update vars.";
if ($processing && $tracking_properties && ($code = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_tracking_codes"]) && is_array($cv = preg_split("/\\|/", $paypal["custom"]))) {
if (($code = preg_replace("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $code)) && ($code = preg_replace("/%%subscr_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["subscr_id"]), $code))) {
if (($code = preg_replace("/%%initial%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["initial"]), $code)) && ($code = preg_replace("/%%regular%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["regular"]), $code)) && ($code = preg_replace("/%%recurring%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["recurring"]), $code))) {
if (($code = preg_replace("/%%initial_term%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["initial_term"]), $code)) && ($code = preg_replace("/%%regular_term%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["regular_term"]), $code))) {
if (($code = preg_replace("/%%item_number%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["item_number"]), $code)) && ($code = preg_replace("/%%item_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["item_name"]), $code))) {
if (($code = preg_replace("/%%first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["first_name"]), $code)) && ($code = preg_replace("/%%last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["last_name"]), $code))) {
if ($code = preg_replace("/%%full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds(trim($paypal["first_name"] . " " . $paypal["last_name"])), $code)) {
if ($code = preg_replace("/%%payer_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["payer_email"]), $code)) {
if ($code = preg_replace("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds($paypal["ip"]), $code)) {
if ($code = trim(preg_replace("/%%(.+?)%%/i", "", $code))) {
$paypal["s2member_log"][] = "Storing Signup Tracking Codes into a Transient Queue. These will be processed on-site.";
set_transient("s2m_" . md5("s2member_transient_signup_tracking_codes_" . $paypal["subscr_id"]), $code, 43200);
}
}
}
}
}
}
}
}
}
}
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_paypal_return_during_subscr_signup_wo_update_vars", get_defined_vars());
unset($__refs, $__v);
if (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site()) {
if ($redirection_url_after_mms_farm_signup = apply_filters("ws_plugin__s2member_redirection_url_after_mms_farm_signup", false, get_defined_vars())) {
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL after signup: " . $redirection_url_after_mms_farm_signup;
wp_redirect($redirection_url_after_mms_farm_signup);
} else {
if ($custom_success_redirection) {
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection;
wp_redirect($custom_success_redirection);
} else {
$paypal["s2member_log"][] = "Redirecting Customer to Signup Page (after displaying a quick thank-you message). They need to Signup/Register now.";
echo c_ws_plugin__s2member_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Thank you! Your account has been approved.<br />The next step is to Register a Username for immediate access.</strong>', "s2member-front", "s2member"), _x("Please Register Now (Click Here)", "s2member-front", "s2member"), c_ws_plugin__s2member_utils_urls::wp_signup_url());
}
}
} else {
if ($redirection_url_after_signup = apply_filters("ws_plugin__s2member_redirection_url_after_signup", false, get_defined_vars())) {
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL after signup: " . $redirection_url_after_signup;
wp_redirect($redirection_url_after_signup);
} else {
if ($custom_success_redirection) {
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection;
wp_redirect($custom_success_redirection);
} else {
$paypal["s2member_log"][] = "Redirecting Customer to Registration Page (after displaying a quick thank-you message). They need to Register now.";
echo c_ws_plugin__s2member_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Thank you! Your account has been approved.<br />The next step is to Register a Username for immediate access.</strong>', "s2member-front", "s2member"), _x("Please Register Now (Click Here)", "s2member-front", "s2member"), c_ws_plugin__s2member_utils_urls::wp_register_url());
}
}
}
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_paypal_return_after_subscr_signup_wo_update_vars", get_defined_vars());
unset($__refs, $__v);
}
} else {
$paypal["s2member_log"][] = "Page Expired. Duplicate Return-Data.";
$paypal["s2member_log"][] = "s2Member `txn_type` identified as ( `web_accept|subscr_signup|subscr_payment` ).";
$paypal["s2member_log"][] = "Page Expired. Redirecting Customer to the Home Page (after displaying an error message).";
echo c_ws_plugin__s2member_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Page Expired:</strong> Duplicate Return-Data.<br />Please contact Support if you need any assistance.', "s2member-front", "s2member"), _x("Back To Home Page", "s2member-front", "s2member"), home_url("/"));
}
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_paypal_return_after_subscr_signup", get_defined_vars());
unset($__refs, $__v);
return apply_filters("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level", $paypal, get_defined_vars());
} else {
return apply_filters("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level", false, get_defined_vars());
}
}
示例5: widget
/**
* Widget display.
*
* @package s2Member\Widgets
* @since 1.5
*
* @param array $args Optional. An array of basic settings.
* @param array $instance Optional. An array of options for this instance.
* @return null
*/
public function widget($args = FALSE, $instance = FALSE)
{
$options = c_ws_plugin__s2member_pro_login_widget::configure_options_and_their_defaults((array) $instance);
/**/
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
do_action("ws_plugin__s2member_pro_login_widget_before_display", get_defined_vars(), $this);
unset($__refs, $__v);
/* Unset defined __refs, __v. */
/**/
echo $args["before_widget"];
/* OK, here we go into this widget. */
/**/
if (is_user_logged_in() && strlen($options["profile_title"]) || !is_user_logged_in() && strlen($options["title"])) {
echo $args["before_title"] . apply_filters("widget_title", $options[is_user_logged_in() ? "profile_title" : "title"]) . $args["after_title"];
}
/**/
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
do_action("ws_plugin__s2member_pro_login_widget_during_display_before", get_defined_vars(), $this);
unset($__refs, $__v);
/* Unset defined __refs, __v. */
/**/
if (!is_user_logged_in()) {
$links = c_ws_plugin__s2member_cache::cached_page_links();
/**/
$ops_page = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"];
/**/
if ($ops_page && is_page($ops_page) && !empty($_GET["_s2member_seeking"]["_uri"])) {
$seeking = trim(base64_decode(trim(stripslashes((string) $_GET["_s2member_seeking"]["_uri"]))));
}
/**/
$options["login_redirect"] = $options["login_redirect"] === "%%previous%%" && $ops_page && is_page($ops_page) && empty($seeking) ? "" : $options["login_redirect"];
/**/
$redirect_to = preg_replace("/%%previous%%/i", !empty($seeking) ? $seeking : $_SERVER["REQUEST_URI"], $redirect_to = $options["login_redirect"]);
$redirect_to = preg_replace("/%%home%%/i", home_url("/"), $redirect_to);
/**/
echo '<div class="ws-plugin--s2member-pro-login-widget">' . "\n";
/**/
echo '<form method="post" action="' . esc_attr(wp_login_url()) . '" class="ws-plugin--s2member-pro-login-widget-form">' . "\n";
/**/
echo '<div class="ws-plugin--s2member-pro-login-widget-username">' . "\n";
echo '<label for="ws-plugin--s2member-pro-login-widget-username">' . _x("Username", "s2member-front", "s2member") . ':</label><br />' . "\n";
echo '<input type="text" name="log" id="ws-plugin--s2member-pro-login-widget-username" title="Username" />' . "\n";
echo '</div>' . "\n";
/**/
echo '<div class="ws-plugin--s2member-pro-login-widget-password">' . "\n";
echo '<label for="ws-plugin--s2member-pro-login-widget-password">' . _x("Password", "s2member-front", "s2member") . ':</label><br />' . "\n";
echo '<input type="password" name="pwd" id="ws-plugin--s2member-pro-login-widget-password" title="Password" />' . "\n";
echo '</div>' . "\n";
/**/
echo '<div class="ws-plugin--s2member-pro-login-widget-lost-password">' . "\n";
$reg_cookies_ok_url = is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site() ? c_ws_plugin__s2member_utils_urls::wp_signup_url() : c_ws_plugin__s2member_utils_urls::wp_register_url();
echo $options["signup_url"] ? '<a href="' . esc_attr($options["signup_url"] !== "%%automatic%%" ? $options["signup_url"] : (c_ws_plugin__s2member_register_access::reg_cookies_ok() ? $reg_cookies_ok_url : $links["membership_options_page"])) . '" tabindex="-1">' . _x("signup now", "s2member-front", "s2member") . '</a> | ' : '';
echo '<a href="' . esc_attr(wp_lostpassword_url()) . '" tabindex="-1">' . _x("forgot password?", "s2member-front", "s2member") . '</a>' . "\n";
echo '</div>' . "\n";
/**/
echo '<div class="ws-plugin--s2member-pro-login-widget-remember-me">' . "\n";
echo '<label><input type="checkbox" name="rememberme" value="forever" />' . _x("Remember Me", "s2member-front", "s2member") . '</label>' . "\n";
echo '</div>' . "\n";
/**/
echo '<div class="ws-plugin--s2member-pro-login-widget-submit">' . "\n";
echo $redirect_to ? '<input type="hidden" name="redirect_to" value="' . esc_attr($redirect_to) . '" />' . "\n" : '';
echo '<input type="submit" value="' . esc_attr(_x("Log Me In", "s2member-front", "s2member")) . '" />' . "\n";
echo '</div>' . "\n";
/**/
echo '</form>' . "\n";
/**/
echo '<div class="ws-plugin--s2member-pro-login-widget-code">' . "\n";
/**/
if (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site()) {
echo do_shortcode(trim($options["logged_out_code"]));
} else {
/* Otherwise, it's OK to execute PHP code. */
echo do_shortcode(c_ws_plugin__s2member_utilities::evl(trim($options["logged_out_code"])));
}
/**/
echo '</div>' . "\n";
/**/
echo '<div style="clear:both;"></div>' . "\n";
/**/
echo '</div>' . "\n";
} else {
if (is_user_logged_in() && is_object($user = wp_get_current_user()) && !empty($user->ID) && ($user_id = $user->ID)) {
$links = c_ws_plugin__s2member_cache::cached_page_links();
/**/
$ops_page = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"];
$welcome_page = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"];
/**/
$options["logout_redirect"] = $options["logout_redirect"] === "%%previous%%" && $ops_page && is_page($ops_page) ? "" : $options["logout_redirect"];
$options["logout_redirect"] = $options["logout_redirect"] === "%%previous%%" && $welcome_page && is_page($welcome_page) ? "" : $options["logout_redirect"];
/**/
//.........这里部分代码省略.........
示例6: ___static_widget___
/**
* Widget display.
*
* @package s2Member\Widgets
* @since 140628
*
* @param array $args Optional. An array of basic settings.
* @param array $instance Optional. An array of options for this instance.
*/
public static function ___static_widget___($args = array(), $instance = array())
{
$options = self::___static_configure_options_and_their_defaults___((array) $instance);
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action('ws_plugin__s2member_pro_login_widget_before_display', get_defined_vars());
unset($__refs, $__v);
// Housekeeping.
echo $args['before_widget'];
// OK, here we go into this widget.
if (is_user_logged_in() && strlen($options['profile_title']) || !is_user_logged_in() && strlen($options['title'])) {
echo $args['before_title'] . apply_filters('widget_title', $options[is_user_logged_in() ? 'profile_title' : 'title']) . $args['after_title'];
}
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action('ws_plugin__s2member_pro_login_widget_during_display_before', get_defined_vars());
unset($__refs, $__v);
// Housekeeping.
if (!is_user_logged_in()) {
$links = c_ws_plugin__s2member_cache::cached_page_links();
$ops_page = $GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_options_page'];
if ($ops_page && is_page($ops_page) && !empty($_GET['_s2member_seeking']['_uri'])) {
$seeking = trim(base64_decode(trim(stripslashes((string) $_GET['_s2member_seeking']['_uri']))));
}
$options['login_redirect'] = $options['login_redirect'] === '%%previous%%' && empty($seeking) && $ops_page && is_page($ops_page) ? '' : $options['login_redirect'];
$options['login_redirect'] = $options['login_redirect'] === '%%previous%%' && empty($seeking) && is_front_page() ? '' : $options['login_redirect'];
$options['login_redirect'] = $options['login_redirect'] === '%%previous%%' && !empty($seeking) && $seeking === '/' ? '' : $options['login_redirect'];
$redirect_to = $options['login_redirect'];
$redirect_to = preg_replace('/%%previous%%/i', !empty($seeking) ? $seeking : $_SERVER['REQUEST_URI'], $redirect_to);
$redirect_to = preg_replace('/%%home%%/i', home_url('/'), $redirect_to);
echo '<div class="ws-plugin--s2member-pro-login-widget">' . "\n";
echo '<form method="post" action="' . esc_attr(site_url('wp-login.php', 'login_post')) . '" class="ws-plugin--s2member-pro-login-widget-form">' . "\n";
echo '<div class="ws-plugin--s2member-pro-login-widget-username">' . "\n";
echo '<label for="ws-plugin--s2member-pro-login-widget-username">' . _x('Username', 's2member-front', 's2member') . ':</label><br />' . "\n";
echo '<input type="text" name="log" id="ws-plugin--s2member-pro-login-widget-username" class="form-control" title="Username" />' . "\n";
echo '</div>' . "\n";
echo '<div class="ws-plugin--s2member-pro-login-widget-password">' . "\n";
echo '<label for="ws-plugin--s2member-pro-login-widget-password">' . _x('Password', 's2member-front', 's2member') . ':</label><br />' . "\n";
echo '<input type="password" name="pwd" id="ws-plugin--s2member-pro-login-widget-password" class="form-control" title="Password" />' . "\n";
echo '</div>' . "\n";
echo '<div class="ws-plugin--s2member-pro-login-widget-lost-password">' . "\n";
$reg_cookies_ok_url = is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site() ? c_ws_plugin__s2member_utils_urls::wp_signup_url() : c_ws_plugin__s2member_utils_urls::wp_register_url();
echo $options['signup_url'] ? '<a href="' . esc_attr($options['signup_url'] !== '%%automatic%%' ? $options['signup_url'] : (c_ws_plugin__s2member_register_access::reg_cookies_ok() ? $reg_cookies_ok_url : $links['membership_options_page'])) . '" tabindex="-1">' . _x('signup now', 's2member-front', 's2member') . '</a> | ' : '';
echo '<a href="' . esc_attr(wp_lostpassword_url()) . '" tabindex="-1">' . _x('forgot password?', 's2member-front', 's2member') . '</a>' . "\n";
echo '</div>' . "\n";
echo '<div class="ws-plugin--s2member-pro-login-widget-remember-me">' . "\n";
echo '<label><input type="checkbox" name="rememberme" value="forever" />' . _x('Remember Me', 's2member-front', 's2member') . '</label>' . "\n";
echo '</div>' . "\n";
echo '<div class="ws-plugin--s2member-pro-login-widget-submit">' . "\n";
if ($redirect_to) {
echo '<input type="hidden" name="redirect_to" value="' . esc_attr($redirect_to) . '" />' . "\n" . (empty($seeking) ? '<input type="hidden" name="redirect_to_automatic" value="1" />' . "\n" : '');
}
echo '<input type="submit" class="btn btn-primary" value="' . esc_attr(_x('Log Me In', 's2member-front', 's2member')) . '" />' . "\n";
echo '</div>' . "\n";
echo '</form>' . "\n";
echo '<div class="ws-plugin--s2member-pro-login-widget-code">' . "\n";
if (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site()) {
echo do_shortcode(trim($options['logged_out_code']));
} else {
// Otherwise, it's OK to execute PHP code.
echo do_shortcode(c_ws_plugin__s2member_utilities::evl(trim($options['logged_out_code'])));
}
echo '</div>' . "\n";
echo '<div style="clear:both;"></div>' . "\n";
echo '</div>' . "\n";
} else {
if (is_user_logged_in() && is_object($user = wp_get_current_user()) && !empty($user->ID) && ($user_id = $user->ID)) {
$links = c_ws_plugin__s2member_cache::cached_page_links();
$ops_page = $GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_options_page'];
$welcome_page = $GLOBALS['WS_PLUGIN__']['s2member']['o']['login_welcome_page'];
$options['logout_redirect'] = $options['logout_redirect'] === '%%previous%%' && $ops_page && is_page($ops_page) ? '' : $options['logout_redirect'];
$options['logout_redirect'] = $options['logout_redirect'] === '%%previous%%' && $welcome_page && is_page($welcome_page) ? '' : $options['logout_redirect'];
$redirect_to = preg_replace('/%%previous%%/i', $_SERVER['REQUEST_URI'], $redirect_to = $options['logout_redirect']);
$redirect_to = preg_replace('/%%home%%/i', home_url('/'), $redirect_to);
echo '<div id="ws-plugin--s2member-pro-login-widget" class="ws-plugin--s2member-pro-login-widget">' . "\n";
echo '<div class="ws-plugin--s2member-pro-login-widget-profile-summary">' . "\n";
echo $options['display_gravatar'] ? ($options['link_gravatar'] ? '<a href="http://www.gravatar.com/" target="_blank">' : '') . get_avatar($user_id, 48) . ($options['link_gravatar'] ? '</a>' : '') . "\n" : '';
echo $options['display_name'] ? '<div class="ws-plugin--s2member-pro-login-widget-profile-summary-name">' . esc_html($user->display_name) . '</div>' . "\n" : '';
echo '<div class="ws-plugin--s2member-pro-login-widget-profile-summary-code">' . "\n";
if (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site()) {
echo do_shortcode(trim($options['logged_in_code']));
} else {
// Otherwise, it's OK to execute PHP code.
echo do_shortcode(c_ws_plugin__s2member_utilities::evl(trim($options['logged_in_code'])));
}
echo '</div>' . "\n";
echo $options['my_account_url'] ? '<div class="ws-plugin--s2member-pro-login-widget-profile-summary-my-account"><a href="' . esc_attr($options['my_account_url'] !== '%%automatic%%' ? c_ws_plugin__s2member_login_redirects::fill_login_redirect_rc_vars($options['my_account_url']) : (($login_redirection_url = c_ws_plugin__s2member_login_redirects::login_redirection_url($user)) ? $login_redirection_url : $links['login_welcome_page'])) . '">' . _x('My Account', 's2member-front', 's2member') . '</a></div>' . "\n" : '';
echo $options['my_profile_url'] ? '<div class="ws-plugin--s2member-pro-login-widget-profile-summary-edit-profile"><a href="' . ($options['my_profile_url'] !== '%%automatic%%' ? esc_attr(c_ws_plugin__s2member_login_redirects::fill_login_redirect_rc_vars($options['my_profile_url'])) : esc_attr(home_url('/?s2member_profile=1')) . '" onclick="if(!window.open(\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq(esc_attr(home_url('/?s2member_profile=1'))) . '\',\'_profile\', \'width=600,height=400,left=\'+((screen.width/2)-(600/2))+\',screenX=\'+((screen.width/2)-(600/2))+\',top=\'+((screen.height/2)-(400/2))+\',screenY=\'+((screen.height/2)-(400/2))+\',location=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1\')) alert(\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq(_x('Please disable popup blockers and try again!', 's2member-front', 's2member')) . '\'); return false;') . '">' . _x('Edit My Profile', 's2member-front', 's2member') . '</a></div>' . "\n" : '';
echo '<div class="ws-plugin--s2member-pro-login-widget-profile-summary-logout"><a href="' . esc_attr(wp_logout_url($redirect_to)) . '">' . _x('Logout', 's2member-front', 's2member') . '</a></div>' . "\n";
//.........这里部分代码省略.........