本文整理汇总了PHP中c_ws_plugin__s2member_utils_strings::esc_js_sq方法的典型用法代码示例。如果您正苦于以下问题:PHP c_ws_plugin__s2member_utils_strings::esc_js_sq方法的具体用法?PHP c_ws_plugin__s2member_utils_strings::esc_js_sq怎么用?PHP c_ws_plugin__s2member_utils_strings::esc_js_sq使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类c_ws_plugin__s2member_utils_strings
的用法示例。
在下文中一共展示了c_ws_plugin__s2member_utils_strings::esc_js_sq方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: recaptcha_script_tag
/**
* Builds a reCAPTCHA™ JavaScript `script` tag for display.
*
* @package s2Member\Utilities
* @since 3.5
*
* @param string $theme Optional. The theme used in display. Defaults to `clean`.
* @param string $tabindex Optional. Value of `tabindex=""` attribute. Defaults to `-1`.
* @param string $error Optional. An error message to display.
* @return string HTML markup for JavaScript tag.
*/
public static function recaptcha_script_tag($theme = FALSE, $tabindex = FALSE, $error = FALSE)
{
$theme = $theme ? $theme : "clean";
$tabindex = strlen($tabindex) ? (int) $tabindex : -1;
$keys = c_ws_plugin__s2member_utils_captchas::recaptcha_keys();
$options = '<script type="text/javascript">' . "if(typeof RecaptchaOptions !== 'object'){ var RecaptchaOptions = {theme: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq($theme) . "', lang: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["recaptcha"]["lang"]) . "', tabindex: " . $tabindex . " }; }" . '</script>' . "\n";
$no_tabindex_icons = '<script type="text/javascript">' . "if(typeof jQuery === 'function'){ jQuery('td a[id^=\"recaptcha\"]').removeAttr('tabindex'); }" . '</script>';
$adjustments = !apply_filters("c_ws_plugin__s2member_utils_tabindex_recaptcha_icons", false, get_defined_vars()) ? $no_tabindex_icons : "";
return $options . '<script type="text/javascript" src="' . esc_attr('https://www.google.com/recaptcha/api/challenge?k=' . urlencode($keys["public"])) . '' . ($error ? '&error=' . urlencode($error) : '') . '"></script>' . $adjustments;
}
示例3: js_w_globals
/**
* Adds Pro Add-on JavaScript.
*
* @package s2Member\CSS_JS
* @since 1.5
*
* @attaches-to ``add_action("ws_plugin__s2member_during_js_w_globals");``
*
* @param array $vars Expects array of defined variables, passed in by the Action Hook.
* @return null
*/
public static function js_w_globals($vars = FALSE)
{
$g = "var S2MEMBER_PRO_VERSION = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_PRO_VERSION) . "',";
$g = trim($g, " ,") . ";";
// Trim & add semicolon.
$u = $GLOBALS["WS_PLUGIN__"]["s2member_pro"]["c"]["dir_url"];
$i = $GLOBALS["WS_PLUGIN__"]["s2member_pro"]["c"]["dir_url"] . "/images";
echo "\n" . $g . "\n";
// Add a line break before inclusion.
include_once dirname(dirname(__FILE__)) . "/s2member-pro-min.js";
return;
// Return unformity.
}
示例4: doctype_html_head
/**
* Returns a DOCTYPE tag along with the HEAD section and title tag.
*
* This method should NOT be called upon until
* {@link s2Member\API_Constants\c_ws_plugin__s2member_constants::constants()}
* has been processed. We need access to: ``WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5``.
*
* @package s2Member\Utilities
* @since 110720
*
* @param str $doctype_html_head_title Optional. The title of the HTML document being generated.
* @param str $doctype_html_head_action Optional. An action Hook to process during HEAD generation.
* @return str A DOCTYPE tag along with the HEAD section and title tag, configured by parameters.
*/
public static function doctype_html_head($doctype_html_head_title = FALSE, $doctype_html_head_action = FALSE)
{
$s2o = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["s2o_url"];
/* Loads s2Member only. */
/**/
ob_start();
/* Start output buffering here so we can "return" the output from this utility. */
/**/
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
/**/
echo '<html xmlns="http://www.w3.org/1999/xhtml">' . "\n";
echo '<head>' . "\n";
/**/
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' . "\n";
/**/
echo '<script type="text/javascript" src="' . esc_attr(site_url("/wp-includes/js/jquery/jquery.js?ver=" . urlencode(c_ws_plugin__s2member_utilities::ver_checksum()))) . '"></script>' . "\n";
echo '<script type="text/javascript" src="' . esc_attr(site_url("/wp-includes/js/l10n.js?ver=" . urlencode(c_ws_plugin__s2member_utilities::ver_checksum()))) . '"></script>' . "\n";
/**/
echo '<script type="text/javascript">' . "var pwsL10n = {empty: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(_x("Strength indicator", "s2member-front", "s2member")) . "', short: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(_x("Very weak", "s2member-front", "s2member")) . "', bad: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(_x("Weak", "s2member-front", "s2member")) . "', good: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(_x("Medium", "s2member-front", "s2member")) . "', strong: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(_x("Strong", "s2member-front", "s2member")) . "', mismatch: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(_x("Mismatch", "s2member-front", "s2member")) . "'}; try{convertEntities(pwsL10n);}catch(e){};</script>" . "\n";
echo '<script type="text/javascript" src="' . esc_attr(site_url("/wp-admin/js/password-strength-meter.js?ver=" . urlencode(c_ws_plugin__s2member_utilities::ver_checksum()))) . '"></script>' . "\n";
/**/
echo '<script type="text/javascript" src="' . esc_attr($s2o . "?ws_plugin__s2member_js_w_globals=" . urlencode(WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5) . "&qcABC=1&ver=" . urlencode(c_ws_plugin__s2member_utilities::ver_checksum())) . '"></script>' . "\n";
/**/
echo '<link href="' . esc_attr($s2o . "?ws_plugin__s2member_css=1&qcABC=1&ver=" . urlencode(c_ws_plugin__s2member_utilities::ver_checksum())) . '" type="text/css" rel="stylesheet" media="all" />' . "\n";
/**/
if ($doctype_html_head_title) {
/* Add <title></title> tag? */
echo '<title>' . $doctype_html_head_title . '</title>' . "\n";
}
/**/
if ($doctype_html_head_action) {
/* Add content from Hook? */
do_action($doctype_html_head_action, get_defined_vars());
}
/**/
echo '</head>' . "\n";
/**/
return ob_get_clean();
}
示例5: handle_profile_modifications
//.........这里部分代码省略.........
if ($user->user_login !== "demo") {
/* No pass change on demo! */
$userdata["user_pass"] = $_p["ws_plugin__s2member_profile_password1"];
}
}
/**/
if (!empty($_p["ws_plugin__s2member_profile_first_name"])) {
$userdata["first_name"] = $_p["ws_plugin__s2member_profile_first_name"];
}
/**/
if (!empty($_p["ws_plugin__s2member_profile_display_name"])) {
$userdata["display_name"] = $_p["ws_plugin__s2member_profile_display_name"];
}
/**/
if (!empty($_p["ws_plugin__s2member_profile_last_name"])) {
$userdata["last_name"] = $_p["ws_plugin__s2member_profile_last_name"];
}
/**/
wp_update_user($userdata);
/* OK. Now send this array for an update. */
/**/
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"]) {
if ($fields_applicable = c_ws_plugin__s2member_custom_reg_fields::custom_fields_configured_at_level("auto-detection", "profile")) {
$_existing_fields = get_user_option("s2member_custom_fields", $user_id);
/**/
foreach (json_decode($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field) {
$field_var = preg_replace("/[^a-z0-9]/i", "_", strtolower($field["id"]));
$field_id_class = preg_replace("/_/", "-", $field_var);
/**/
if (!in_array($field["id"], $fields_applicable) || strpos($field["editable"], "no") === 0) {
if (isset($_existing_fields[$field_var]) && (is_array($_existing_fields[$field_var]) && !empty($_existing_fields[$field_var]) || is_string($_existing_fields[$field_var]) && strlen($_existing_fields[$field_var]))) {
$fields[$field_var] = $_existing_fields[$field_var];
} else {
/* Else ``unset()``. */
unset($fields[$field_var]);
}
} else {
if ($field["required"] === "yes" && (!isset($_p["ws_plugin__s2member_profile_" . $field_var]) || !is_array($_p["ws_plugin__s2member_profile_" . $field_var]) && !is_string($_p["ws_plugin__s2member_profile_" . $field_var]) || is_array($_p["ws_plugin__s2member_profile_" . $field_var]) && empty($_p["ws_plugin__s2member_profile_" . $field_var]) || is_string($_p["ws_plugin__s2member_profile_" . $field_var]) && !strlen($_p["ws_plugin__s2member_profile_" . $field_var]))) {
if (isset($_existing_fields[$field_var]) && (is_array($_existing_fields[$field_var]) && !empty($_existing_fields[$field_var]) || is_string($_existing_fields[$field_var]) && strlen($_existing_fields[$field_var]))) {
$fields[$field_var] = $_existing_fields[$field_var];
} else {
/* Else ``unset()``. */
unset($fields[$field_var]);
}
} else {
if (isset($_p["ws_plugin__s2member_profile_" . $field_var])) {
if (is_array($_p["ws_plugin__s2member_profile_" . $field_var]) && !empty($_p["ws_plugin__s2member_profile_" . $field_var]) || is_string($_p["ws_plugin__s2member_profile_" . $field_var]) && strlen($_p["ws_plugin__s2member_profile_" . $field_var])) {
$fields[$field_var] = $_p["ws_plugin__s2member_profile_" . $field_var];
} else {
/* Else ``unset()``. */
unset($fields[$field_var]);
}
} else {
/* Else ``unset()``. */
unset($fields[$field_var]);
}
}
}
}
/**/
if (!empty($fields)) {
update_user_option($user_id, "s2member_custom_fields", $fields);
} else {
/* Else delete their Custom Fields? */
delete_user_option($user_id, "s2member_custom_fields");
}
}
}
/**/
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
do_action("ws_plugin__s2member_during_handle_profile_modifications", get_defined_vars());
unset($__refs, $__v);
/* Unset defined __refs, __v. */
/**/
$user = new WP_User($user_id);
/* Update the ``WP_User`` object for the current User/Member. */
function_exists("setup_userdata") ? setup_userdata() : null;
/* Update global vars. */
/**/
$lwp = c_ws_plugin__s2member_login_redirects::login_redirection_url($user);
$lwp = !$lwp ? get_page_link($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"]) : $lwp;
/**/
if (empty($_p["ws_plugin__s2member_sc_profile_save"])) {
echo '<script type="text/javascript">' . "\n";
echo "if(window.parent && window.parent != window) { window.parent.alert('" . c_ws_plugin__s2member_utils_strings::esc_js_sq(_x("Profile updated successfully.", "s2member-front", "s2member")) . "'); window.parent.location = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq($lwp) . "'; }";
echo "else if(window.opener) { window.alert('" . c_ws_plugin__s2member_utils_strings::esc_js_sq(_x("Profile updated successfully.", "s2member-front", "s2member")) . "'); window.opener.location = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq($lwp) . "'; window.close(); }";
echo "else { alert('" . c_ws_plugin__s2member_utils_strings::esc_js_sq(_x("Profile updated successfully.", "s2member-front", "s2member")) . "'); window.location = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq($lwp) . "'; }";
echo '</script>' . "\n";
/**/
exit;
/* Clean exit. */
}
}
}
/**/
do_action("ws_plugin__s2member_after_handle_profile_modifications", get_defined_vars());
/**/
return;
/* Return for uniformity. */
}
示例6: _admin_user_new_fields
//.........这里部分代码省略.........
$unfs .= '<th><label for="ws-plugin--s2member-user-new-s2member-subscr-gateway">Paid Subscr. Gateway:</label> <a href="#" onclick="alert(\'A Payment Gateway code is associated with the Paid Subscr. ID below. A Paid Subscription ID (or a Buy Now Transaction ID) is only valid for paid Members. Also known as (a Recurring Profile ID, a ClickBank Receipt #, a Google Order ID, an AliPay Trade No.). Under normal circumstances, this is filled automatically by s2Member. This field is ONLY here for Customer Service purposes; just in case you ever need to enter a Paid Subscr. Gateway/ID manually. This field will be empty for Free Subscribers, and/or anyone who is NOT paying you.\\n\\nThe value of Paid Subscr. ID, can be a PayPal Standard `Subscription ID`, or a PayPal Pro `Recurring Profile ID`, or a PayPal `Transaction ID`; depending on the type of sale. Your PayPal account will supply this information. If you\\\'re using Google Wallet, use the Google Order ID. ClickBank provides a Receipt #, ccBill provides a Subscription ID, Authorize.Net provides a Subscription ID, and AliPay provides a Transaction ID. The general rule is... IF there\\\'s a Subscription ID, use that! If there\\\'s NOT, use the Transaction ID.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
$unfs .= '<td><select name="ws_plugin__s2member_user_new_s2member_subscr_gateway" id="ws-plugin--s2member-user-new-s2member-subscr-gateway" style="width:25em;"><option value=""></option>' . "\n";
foreach (apply_filters("ws_plugin__s2member_profile_s2member_subscr_gateways", array("paypal" => "PayPal (code: paypal)"), get_defined_vars()) as $gateway => $gateway_name) {
$unfs .= '<option value="' . esc_attr($gateway) . '"' . ($gateway === $_p["ws_plugin__s2member_user_new_s2member_subscr_gateway"] ? ' selected="selected"' : '') . '>' . esc_html($gateway_name) . '</option>' . "\n";
}
$unfs .= '</select>' . "\n";
$unfs .= '</td>' . "\n";
$unfs .= '</tr>' . "\n";
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("_ws_plugin__s2member_during_admin_user_new_fields_after_subscr_gateway", get_defined_vars());
unset($__refs, $__v);
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("_ws_plugin__s2member_during_admin_user_new_fields_before_subscr_id", get_defined_vars());
unset($__refs, $__v);
$unfs .= '<tr>' . "\n";
$unfs .= '<th><label for="ws-plugin--s2member-user-new-s2member-subscr-id">Paid Subscr. ID:</label> <a href="#" onclick="alert(\'A Paid Subscription ID (or a Buy Now Transaction ID) is only valid for paid Members. Also known as (a Recurring Profile ID, a ClickBank Receipt #, a Google Order ID, an AliPay Trade No.). Under normal circumstances, this is filled automatically by s2Member. This field is ONLY here for Customer Service purposes; just in case you ever need to enter a Paid Subscr. Gateway/ID manually. This field will be empty for Free Subscribers, and/or anyone who is NOT paying you.\\n\\nThe value of Paid Subscr. ID, can be a PayPal Standard `Subscription ID`, or a PayPal Pro `Recurring Profile ID`, or a PayPal `Transaction ID`; depending on the type of sale. Your PayPal account will supply this information. If you\\\'re using Google Wallet, use the Google Order ID. ClickBank provides a Receipt #, ccBill provides a Subscription ID, Authorize.Net provides a Subscription ID, and AliPay provides a Transaction ID. The general rule is... if there\\\'s a Subscription ID, use that! If there\\\'s NOT, use the Transaction ID.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
$unfs .= '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_user_new_s2member_subscr_id" id="ws-plugin--s2member-user-new-s2member-subscr-id" value="' . format_to_edit($_p["ws_plugin__s2member_user_new_s2member_subscr_id"]) . '" class="regular-text" /></td>' . "\n";
$unfs .= '</tr>' . "\n";
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("_ws_plugin__s2member_during_admin_user_new_fields_after_subscr_id", get_defined_vars());
unset($__refs, $__v);
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("_ws_plugin__s2member_during_admin_user_new_fields_before_custom", get_defined_vars());
unset($__refs, $__v);
$unfs .= '<tr>' . "\n";
$unfs .= '<th><label for="ws-plugin--s2member-user-new-s2member-custom">Custom Value:</label> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
$unfs .= '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_user_new_s2member_custom" id="ws-plugin--s2member-user-new-s2member-custom" value="' . format_to_edit($_p["ws_plugin__s2member_user_new_s2member_custom"]) . '" class="regular-text" /></td>' . "\n";
$unfs .= '</tr>' . "\n";
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("_ws_plugin__s2member_during_admin_user_new_fields_after_custom", get_defined_vars());
unset($__refs, $__v);
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("_ws_plugin__s2member_during_admin_user_new_fields_before_registration_ip", get_defined_vars());
unset($__refs, $__v);
$unfs .= '<tr>' . "\n";
$unfs .= '<th><label for="ws-plugin--s2member-user-new-s2member-registration-ip">Registration IP:</label> <a href="#" onclick="alert(\'This is the IP Address the User had at the time of registration. If you don\\\'t know the User\\\'s IP Address, just leave this blank. If this is left empty, s2Member will make attempts in the future to grab the User\\\'s IP Address.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
$unfs .= '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_user_new_s2member_registration_ip" id="ws-plugin--s2member-user-new-s2member-registration-ip" value="' . format_to_edit($_p["ws_plugin__s2member_user_new_s2member_registration_ip"]) . '" class="regular-text" /></td>' . "\n";
$unfs .= '</tr>' . "\n";
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("_ws_plugin__s2member_during_admin_user_new_fields_after_registration_ip", get_defined_vars());
unset($__refs, $__v);
if (!is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site()) {
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("_ws_plugin__s2member_during_admin_user_new_fields_before_ccaps", get_defined_vars());
unset($__refs, $__v);
$unfs .= '<tr>' . "\n";
$unfs .= '<th><label for="ws-plugin--s2member-user-new-s2member-ccaps">Custom Capabilities:</label> <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member → API Scripting → Custom Capabilities.' . (is_multisite() ? '\\n\\nCustom Capabilities are assigned on a per-Blog basis. So having a set of Custom Capabilities for one Blog, and having NO Custom Capabilities on another Blog - is very common. This is how permissions are designed to work.' : '') . '\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
$unfs .= '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_user_new_s2member_ccaps" id="ws-plugin--s2member-user-new-s2member-ccaps" value="' . format_to_edit($_p["ws_plugin__s2member_user_new_s2member_ccaps"]) . '" class="regular-text" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \\-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></td>' . "\n";
$unfs .= '</tr>' . "\n";
foreach (array_keys(get_defined_vars()) as $__v) {
示例7: __construct
//.........这里部分代码省略.........
$ws_plugin__s2member_temp_s = preg_replace("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_refs(esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images")), $ws_plugin__s2member_temp_s);
$ws_plugin__s2member_temp_s = preg_replace("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_refs(esc_attr(home_url())), $ws_plugin__s2member_temp_s);
echo format_to_edit($ws_plugin__s2member_temp_s);
echo '</textarea><br />' . "\n";
echo '↑ <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
echo '</div>' . "\n";
echo '</form>' . "\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_paypal_buttons_page_during_left_sections_after_cancellation_buttons", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_display_reg_links", true, get_defined_vars())) {
do_action("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_before_reg_links", get_defined_vars());
echo '<div class="ws-menu-page-group" title="PayPal Member Registration Access Links">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-reg-links-section">' . "\n";
echo '<h3>Registration Access Link Generator (for Customer Service)</h3>' . "\n";
echo '<p>s2Member automatically generates Registration Access Links for your Customers after checkout, and also sends them a link in a Confirmation Email. However, if you ever need to deal with a Customer Service issue that requires a new Registration Access Link to be created manually, you can use this tool for that. Alternatively, you can create their account yourself/manually by going to <strong>Users ⥱ Add New</strong>. Either of these methods will work fine.</p>' . "\n";
do_action("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_during_reg_links", get_defined_vars());
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
echo '<p>Paid Membership Level#: <select id="ws-plugin--s2member-reg-link-level" style="min-width:200px;">' . "\n";
for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
echo '<option value="' . $n . '">s2Member Level #' . $n . '</option>' . "\n";
}
echo '</select></p>' . "\n";
echo '<p>Paid Subscr. ID: <input type="text" autocomplete="off" id="ws-plugin--s2member-reg-link-subscr-id" value="" size="50" /> <a href="#" onclick="alert(\'The Customer\\\'s Paid Subscr. ID (aka: Recurring Profile ID, Transaction ID) must be unique. This value can be obtained from inside your PayPal account under the History tab. Each paying Customer MUST be associated with a unique Paid Subscr. ID. If the Customer is NOT associated with a Paid Subscr. ID, you will need to generate a unique value for this field on your own. But keep in mind, s2Member will be unable to maintain future communication with the PayPal IPN (i.e., Notification) service if this value does not reflect a real Paid Subscr. ID that exists in your PayPal History log.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
echo '<p>Custom String Value: <input type="text" autocomplete="off" id="ws-plugin--s2member-reg-link-custom" value="' . esc_attr($_SERVER["HTTP_HOST"]) . '" size="30" /> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a> <input type="button" value="Generate Access Link" onclick="ws_plugin__s2member_paypalRegLinkGenerate();" /> <img id="ws-plugin--s2member-reg-link-loading" src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
echo '<p' . (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '>Custom Capabilities (comma-delimited) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member ⥱ API Scripting ⥱ Custom Capabilities.\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-reg-link-ccaps" size="40" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \\-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></p>' . "\n";
echo '<p>Fixed Term Length (for Buy Now transactions): <input type="text" autocomplete="off" id="ws-plugin--s2member-reg-link-fixed-term" value="" size="10" /> <a href="#" onclick="alert(\'If the Customer purchased Membership through a Buy Now transaction (i.e., there is no Initial/Trial Period and no recurring charges for ongoing access), you may configure a Fixed Term Length in this field. This way the Customer\\\'s Membership Access is automatically revoked by s2Member at the appropriate time. This will be a numeric value, followed by a space, then a single letter.\\n\\nHere are some examples:\\n\\n1 D (this means 1 Day)\\n1 W (this means 1 Week)\\n1 M (this means 1 Month)\\n1 Y (this means 1 Year)\\n1 L (this means 1 Lifetime)\'); return false;">[?]</a></p>' . "\n";
echo '<p id="ws-plugin--s2member-reg-link" style="display:none;"></p>' . "\n";
echo '</form>' . "\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_paypal_buttons_page_during_left_sections_after_reg_links", get_defined_vars());
}
if (apply_filters("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_display_sp_buttons", true, get_defined_vars())) {
do_action("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_before_sp_buttons", get_defined_vars());
echo '<div class="ws-menu-page-group" title="PayPal Specific Post/Page (Buy Now) Buttons">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-sp-buttons-section">' . "\n";
echo '<h3>Button Code Generator For Specific Post/Page Buttons</h3>' . "\n";
echo '<p>s2Member now supports an additional layer of functionality (very powerful), which allows you to sell access to specific Posts/Pages that you\'ve created in WordPress. Specific Post/Page Access works independently from Member Level Access. That is, you can sell an unlimited number of Posts/Pages using "Buy Now" Buttons, and your Customers will NOT be required to have a Membership Account with your site in order to receive access. If they are already a Member, that\'s fine, but they won\'t need to be.</p>' . "\n";
echo '<p>In other words, Customers will NOT need to login, just to receive access to the Specific Post/Page they purchased access to. s2Member will immediately redirect the Customer to the Specific Post/Page after checkout is completed successfully. An email is also sent to the Customer with a link (see: <strong>s2Member ⥱ PayPal Options ⥱ Specific Post/Page Email</strong>). Authentication is handled automatically through self-expiring links, good for 72 hours by default.</p>' . "\n";
echo '<p>Specific Post/Page Access, is sort of like selling a product. Only, instead of shipping anything to the Customer, you just give them access to a specific Post/Page on your site; one that you created in WordPress. A Specific Post/Page that is protected by s2Member, might contain a download link for your eBook, access to file & music downloads, access to additional support services, and the list goes on and on. The possibilities with this are endless; as long as your digital product can be delivered through access to a WordPress Post/Page that you\'ve created. To protect Specific Posts/Pages, please see: <strong>s2Member ⥱ Restriction Options ⥱ Specific Post/Page Access</strong>. Once you\'ve configured your Specific Post/Page Restrictions, those Posts/Pages will be available in the menus below.</p>' . "\n";
echo '<p>Very simple. All you do is customize the form fields provided, for each Post/Page that you plan to sell. Then press (Generate Button Code). These special PayPal Buttons are customized to work with s2Member seamlessly. You can even Package Additional Posts/Pages together into one transaction.</p>' . "\n";
echo '<p><em><strong>Please note:</strong> buttons are NOT saved here. This is only a Button Generator. Once you\'ve generated your Button, copy/paste it into your WordPress Editor. If you lose your Button Code, you\'ll need to come back & re-generate a new one. If you\'re in Sandbox Test-Mode, and you\'re NOT using the Shortcode Format, please remember to come back and re-generate your Buttons before you go live.</em></p>' . "\n";
do_action("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_during_sp_buttons", get_defined_vars());
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th class="ws-menu-page-th-side">' . "\n";
echo '<label for="ws-plugin--s2member-sp-shortcode">' . "\n";
echo 'Button Code<br />Specific Posts/Pages:<br /><br />' . "\n";
echo '<div id="ws-plugin--s2member-sp-button-prev"></div>' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
示例8: __construct
//.........这里部分代码省略.........
echo '</form>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td colspan="2">' . "\n";
echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
echo '<strong>WordPress Shortcode:</strong> (recommended for both the WordPress Visual & HTML Editors)<br />' . "\n";
$ws_plugin__s2member_pro_temp_s = trim(c_ws_plugin__s2member_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/google-ccaps-checkout-button-shortcode.php")));
$ws_plugin__s2member_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_refs(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_pro_temp_s);
echo '<input type="text" autocomplete="off" id="ws-plugin--s2member-pro-ccap-shortcode" value="' . format_to_edit($ws_plugin__s2member_pro_temp_s) . '" onclick="this.select ();" class="monospace" />' . "\n";
echo '</form>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
}
echo '<div class="ws-menu-page-group" title="Google Member Registration Access Links">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-reg-links-section">' . "\n";
echo '<h3>Registration Access Link Generator (for Customer Service)</h3>' . "\n";
echo '<p>s2Member automatically generates Registration Access Links for your Customers after checkout, and also sends them a link in a Confirmation Email. However, if you ever need to deal with a Customer Service issue that requires a new Registration Access Link to be created manually, you can use this tool for that. Alternatively, you can create their account yourself/manually by going to <strong>Users → Add New</strong>. Either of these methods will work fine.</p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
echo '<p>Paid Membership Level#: <select id="ws-plugin--s2member-pro-reg-link-level">' . "\n";
for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
echo '<option value="' . $n . '">s2Member Level #' . $n . '</option>' . "\n";
}
echo '</select></p>' . "\n";
echo '<p>Paid Subscr. ID: <input type="text" autocomplete="off" id="ws-plugin--s2member-pro-reg-link-subscr-id" value="" size="50" /> <a href="#" onclick="alert(\'The Customer\\\'s Paid Subscr. ID (aka: a Google Wallet Order ID. This value can be obtained from inside your Google Wallet account. Each paying Customer MUST be associated with a unique Paid Subscr. ID. If the Customer is NOT associated with a Paid Subscr. ID, you will need to generate a unique value for this field on your own. But keep in mind, s2Member will be unable to maintain future communication with the Google IPN (i.e., Notification/Postback) service if this value does not reflect a real Paid Subscr. ID that exists in your Google Wallet transaction log.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
echo '<p>Custom String Value: <input type="text" autocomplete="off" id="ws-plugin--s2member-pro-reg-link-custom" value="' . esc_attr($_SERVER["HTTP_HOST"]) . '" size="30" /> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a> <input type="button" value="Generate Access Link" onclick="ws_plugin__s2member_pro_googleRegLinkGenerate();" /> <img id="ws-plugin--s2member-pro-reg-link-loading" src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
echo '<p' . (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '>Custom Capabilities (comma-delimited) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member → API Scripting → Custom Capabilities.\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-pro-reg-link-ccaps" size="40" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \\-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></p>' . "\n";
echo '<p>Fixed Term Length (for Buy Now transactions): <input type="text" autocomplete="off" id="ws-plugin--s2member-pro-reg-link-fixed-term" value="" size="10" /> <a href="#" onclick="alert(\'If the Customer purchased Membership through a Buy Now transaction (i.e., there is no Initial/Trial Period and no recurring charges for ongoing access), you may configure a Fixed Term Length in this field. This way the Customer\\\'s Membership Access is revoked by s2Member at the appropriate time. This will be a numeric value, followed by a space, then a single letter.\\n\\nHere are some examples:\\n\\n1 D (this means 1 Day)\\n1 W (this means 1 Week)\\n1 M (this means 1 Month)\\n1 Y (this means 1 Year)\\n1 L (this means 1 Lifetime)\'); return false;">[?]</a></p>' . "\n";
echo '<p id="ws-plugin--s2member-pro-reg-link" class="monospace" style="display:none;"></p>' . "\n";
echo '</form>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
echo '<div class="ws-menu-page-group" title="Specific Post/Page (Buy Now) Buttons">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-sp-buttons-section">' . "\n";
echo '<h3>Button Code Generator For Specific Post/Page Buttons</h3>' . "\n";
echo '<p>s2Member now supports an additional layer of functionality (very powerful), which allows you to sell access to specific Posts/Pages that you\'ve created in WordPress. Specific Post/Page Access works independently from Member Level Access. That is, you can sell an unlimited number of Posts/Pages using "Buy Now" Buttons, and your Customers will NOT be required to have a Membership Account with your site in order to receive access. If they are already a Member, that\'s fine, but they won\'t need to be.</p>' . "\n";
echo '<p>In other words, Customers will NOT need to login, just to receive access to the Specific Post/Page they purchased access to. s2Member can simply send an email to the Customer with a link (see: <strong>s2Member → Google Options → Specific Post/Page Email</strong>). Authentication is handled automatically through self-expiring links, good for 72 hours by default.</p>' . "\n";
echo '<p>Specific Post/Page Access, is sort of like selling a product. Only, instead of shipping anything to the Customer, you just give them access to a specific Post/Page on your site; one that you created in WordPress. A Specific Post/Page that is protected by s2Member, might contain a download link for your eBook, access to file & music downloads, access to additional support services, and the list goes on and on. The possibilities with this are endless; as long as your digital product can be delivered through access to a WordPress Post/Page that you\'ve created. To protect Specific Posts/Pages, please see: <strong>s2Member → Restriction Options → Specific Post/Page Access</strong>. Once you\'ve configured your Specific Post/Page Restrictions, those Posts/Pages will be available in the menus below.</p>' . "\n";
echo '<p>Very simple. All you do is customize the form fields provided, for each Post/Page that you plan to sell. Then press (Generate Button Code). These Google Wallet Buttons are customized to work with s2Member seamlessly. You can even Package Additional Posts/Pages together into one transaction. <em><strong>Please note:</strong> buttons are NOT saved here. This is only a Button Generator. Once you\'ve generated your Button, copy/paste it into your WordPress Editor, wherever you feel it would be most appropriate. If you lose your Button Code, you\'ll need to come back & re-generate a new one.</em></p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th class="ws-menu-page-th-side">' . "\n";
echo '<label for="ws-plugin--s2member-pro-sp-shortcode">' . "\n";
echo 'Button Code<br />Specific Posts/Pages:<br /><br />' . "\n";
echo '<div id="ws-plugin--s2member-pro-sp-button-prev"></div>' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '<td>' . "\n";
echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
echo '<p><select id="ws-plugin--s2member-pro-sp-leading-id">' . "\n";
echo '<option value="">— Select a Leading Post/Page that you\'ve protected —</option>' . "\n";
$ws_plugin__s2member_pro_temp_a_singulars = c_ws_plugin__s2member_utils_gets::get_all_singulars_with_sp("exclude-conflicts");
foreach ($ws_plugin__s2member_pro_temp_a_singulars as $ws_plugin__s2member_pro_temp_o) {
示例9: users_list_edit_cols
/**
* Adds Custom Fields to the admin Profile editing page.
*
* @package s2Member\Users_List
* @since 3.5
*
* @attaches-to ``add_action("edit_user_profile");``
* @attaches-to ``add_action("show_user_profile");``
*
* @param obj $user Expects a `WP_User` object passed in by the Action Hook.
* @return null
*/
public static function users_list_edit_cols($user = FALSE)
{
global $current_site, $current_blog;
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_before_users_list_edit_cols", get_defined_vars());
unset($__refs, $__v);
$current_user = is_user_logged_in() ? wp_get_current_user() : false;
// Current User.
if (is_object($user) && !empty($user->ID) && ($user_id = $user->ID) && is_object($current_user) && !empty($current_user->ID)) {
$role = c_ws_plugin__s2member_user_access::user_access_role($user);
// This User's current WordPress Role.
$level = c_ws_plugin__s2member_user_access::user_access_level($user);
// User's Access Level for s2Member.
if (current_user_can("edit_users") && (!is_multisite() || is_super_admin() || is_user_member_of_blog($user_id))) {
echo '<div style="margin:25px 0 25px 0; height:1px; line-height:1px; background:#CCCCCC;"></div>' . "\n";
echo '<h3 style="position:relative;"><img src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/large-icon.png" title="s2Member (a Membership management system for WordPress)" alt="" style="position:absolute; top:-15px; right:0; border:0;" />s2Member Configuration & Profile Fields' . (is_multisite() ? ' (for this Blog)' : '') . '</h3>' . "\n";
echo '<table class="form-table">' . "\n";
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_users_list_edit_cols_before", get_defined_vars());
unset($__refs, $__v);
if (is_multisite() && is_super_admin()) {
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_users_list_edit_cols_before_originating_blog", get_defined_vars());
unset($__refs, $__v);
echo '<tr>' . "\n";
echo '<th><label for="ws-plugin--s2member-profile-s2member-originating-blog">Originating Blog ID#:</label> <a href="#" onclick="alert(\'On a Multisite Network, this is how s2Member keeps track of which Blog each User/Member originated from. So this ID#, is automatically associated with a Blog in your Network, matching the User\\\'s point of origin. ~ ONLY a Super Admin can modify this.\\n\\nOn a Multisite Blog Farm, the Originating Blog ID# for your own Customers, will ALWAYS be associated with your (Main Site). It is NOT likely that you\\\'ll need to modify this manually, but s2Member makes it available; just in case.\\n\\n*Tip* - If you add Users (and/or Blogs) with the `Super Admin` Network Administration panel inside WordPress, then you WILL need to set everything manually. s2Member does NOT tamper with automation routines whenever YOU (as a Super Administrator) are working in that area.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
echo '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_profile_s2member_originating_blog" id="ws-plugin--s2member-profile-s2member-originating-blog" value="' . format_to_edit(get_user_meta($user_id, "s2member_originating_blog", true)) . '" class="regular-text" /></td>' . "\n";
echo '</tr>' . "\n";
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_users_list_edit_cols_after_originating_blog", get_defined_vars());
unset($__refs, $__v);
}
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_users_list_edit_cols_before_subscr_gateway", get_defined_vars());
unset($__refs, $__v);
echo '<tr>' . "\n";
echo '<th><label for="ws-plugin--s2member-profile-s2member-subscr-gateway">Paid Subscr. Gateway:</label> <a href="#" onclick="alert(\'A Payment Gateway code is associated with the Paid Subscr. ID below. A Paid Subscription ID (or a Buy Now Transaction ID) is only valid for paid Members. Also known as (a Recurring Profile ID, a ClickBank Receipt #, a Google Order ID, an AliPay Trade No.). This will be filled automatically by s2Member.\\n\\nThis field will be empty for Free Subscribers, and/or anyone who is NOT paying you. This field is only editable for Customer Service purposes; just in case you ever need to update the Paid Subscr. Gateway/ID manually.\\n\\nThe value of Paid Subscr. ID, can be a PayPal Standard `Subscription ID`, or a PayPal Pro `Recurring Profile ID`, or a PayPal `Transaction ID`; depending on the type of sale. Your PayPal account will supply this information. If you\\\'re using Google Wallet, use the Google Order ID. ClickBank provides a Receipt #, ccBill provides a Subscription ID, Authorize.Net provides a Subscription ID, and AliPay provides a Transaction ID. The general rule is... IF there\\\'s a Subscription ID, use that! If there\\\'s NOT, use the Transaction ID.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
echo '<td><select name="ws_plugin__s2member_profile_s2member_subscr_gateway" id="ws-plugin--s2member-profile-s2member-subscr-gateway" style="width:25em;"><option value=""></option>' . "\n";
foreach (apply_filters("ws_plugin__s2member_profile_s2member_subscr_gateways", array("paypal" => "PayPal (code: paypal)"), get_defined_vars()) as $gateway => $gateway_name) {
echo '<option value="' . esc_attr($gateway) . '"' . ($gateway === get_user_option("s2member_subscr_gateway", $user_id) ? ' selected="selected"' : '') . '>' . esc_html($gateway_name) . '</option>' . "\n";
}
echo '</select>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_users_list_edit_cols_after_subscr_gateway", get_defined_vars());
unset($__refs, $__v);
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_users_list_edit_cols_before_subscr_id", get_defined_vars());
unset($__refs, $__v);
echo '<tr>' . "\n";
echo '<th><label for="ws-plugin--s2member-profile-s2member-subscr-id">Paid Subscr. ID:</label> <a href="#" onclick="alert(\'A Paid Subscription ID (or a Buy Now Transaction ID) is only valid for paid Members. Also known as (a Recurring Profile ID, a ClickBank Receipt #, a Google Order ID, an AliPay Trade No.). This will be filled automatically by s2Member.\\n\\nThis field will be empty for Free Subscribers, and/or anyone who is NOT paying you. This field is only editable for Customer Service purposes; just in case you ever need to update the Paid Subscr. Gateway/ID manually.\\n\\nThe value of Paid Subscr. ID, can be a PayPal Standard `Subscription ID`, or a PayPal Pro `Recurring Profile ID`, or a PayPal `Transaction ID`; depending on the type of sale. Your PayPal account will supply this information. If you\\\'re using Google Wallet, use the Google Order ID. ClickBank provides a Receipt #, ccBill provides a Subscription ID, Authorize.Net provides a Subscription ID, and AliPay provides a Transaction ID. The general rule is... IF there\\\'s a Subscription ID, use that! If there\\\'s NOT, use the Transaction ID.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
echo '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_profile_s2member_subscr_id" id="ws-plugin--s2member-profile-s2member-subscr-id" value="' . format_to_edit(get_user_option("s2member_subscr_id", $user_id)) . '" class="regular-text" /></td>' . "\n";
echo '</tr>' . "\n";
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_users_list_edit_cols_after_subscr_id", get_defined_vars());
unset($__refs, $__v);
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_users_list_edit_cols_before_custom", get_defined_vars());
unset($__refs, $__v);
echo '<tr>' . "\n";
echo '<th><label for="ws-plugin--s2member-profile-s2member-custom">Custom Value:</label> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
echo '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_profile_s2member_custom" id="ws-plugin--s2member-profile-s2member-custom" value="' . format_to_edit(get_user_option("s2member_custom", $user_id)) . '" class="regular-text" /></td>' . "\n";
echo '</tr>' . "\n";
foreach (array_keys(get_defined_vars()) as $__v) {
$__refs[$__v] =& ${$__v};
}
do_action("ws_plugin__s2member_during_users_list_edit_cols_after_custom", get_defined_vars());
unset($__refs, $__v);
foreach (array_keys(get_defined_vars()) as $__v) {
//.........这里部分代码省略.........
示例10: sc_get_stream
//.........这里部分代码省略.........
// Default aspect ratio width.
$player_resolution_aspect_ratio_h = 9;
// Default aspect ratio in height.
if ($attr['player_aspectratio'] && preg_match('/^[0-9]+\\:[0-9]+$/', $attr['player_aspectratio'])) {
list($player_resolution_aspect_ratio_w, $player_resolution_aspect_ratio_h) = explode(':', $attr['player_aspectratio']);
}
$player_resolution_aspect_ratio_w = (int) $player_resolution_aspect_ratio_w;
// Force integer value.
$player_resolution_aspect_ratio_h = (int) $player_resolution_aspect_ratio_h;
// Force integer value.
// See: <http://wsharks.com/1yzjAl6> and <http://wsharks.com/1yzkhea> regarging the SMIL bitrate hints given here.
$player_resolution_bitrates = array(2160 => '35000000', 1440 => '10000000', 1080 => '8000000', 720 => '5000000', 640 => '2500001', 480 => '2500000', 360 => '1000000', 320 => '999999', 240 => '500000', 180 => '300000');
$player_resolution_bitrates = apply_filters('ws_plugin__s2member_sc_get_stream_resolution_bitrates', $player_resolution_bitrates, get_defined_vars());
$player_resolution_sources_smil_file_id = md5(serialize($attr) . $_SERVER['REMOTE_ADDR']);
// Initialize SMIL ID.
$player_resolution_sources_smil_file_url = home_url('/s2member-rsf-file.smil?s2member_rsf_file=' . urlencode($player_resolution_sources_smil_file_id) . '&s2member_rsf_file_ip=' . urlencode($_SERVER['REMOTE_ADDR']));
$player_resolution_sources_smil_file_url = c_ws_plugin__s2member_utils_urls::add_s2member_sig($player_resolution_sources_smil_file_url);
$player_resolution_sources_smil_file_contents = '';
// Initialize player sources SMIL file contents.
$player_sources = '';
// Initialize player sources; empty string.
foreach ($file_download_urls as $_file_download_url_label => $_file_download_url) {
$_is_first_file_download_url = $_player_sources_counter <= 1;
$_is_last_file_download_url = $_player_sources_counter >= $_total_player_sources;
if ($_is_first_file_download_url) {
// We base this conditional on the first streamer.
$_uses_rtmp_streamers = stripos($_file_download_url['streamer'], 'rtmp') === 0;
}
switch ($attr['player']) {
case 'jwplayer-v6':
// Default w/ a direct URL (very simple).
$player_sources .= ',{';
// Open this source; JSON object properties.
$player_sources .= "'file': '" . c_ws_plugin__s2member_utils_strings::esc_js_sq($_file_download_url['url']) . "'";
if (is_string($_file_download_url_label)) {
$player_sources .= ",'label': '" . c_ws_plugin__s2member_utils_strings::esc_js_sq($_file_download_url_label) . "'";
}
if ($_is_first_file_download_url) {
$player_sources .= ",'default': 'true'";
}
$player_sources .= '}';
// Close this source.
break;
// Break switch loop.
// Break switch loop.
case 'jwplayer-v6-rtmp':
// RTMP w/ downloadable fallback (mobile compatibility).
// RTMP w/ downloadable fallback (mobile compatibility).
case 'jwplayer-v6-rtmp-only':
// RTMP streaming only (flash player only).
if ($attr['player_resolutions'] && $_total_player_sources > 1 && $_uses_rtmp_streamers) {
if ($_is_first_file_download_url) {
$player_sources .= ',{';
// Open this source; JSON object properties.
$player_sources .= "'file': '" . c_ws_plugin__s2member_utils_strings::esc_js_sq($player_resolution_sources_smil_file_url) . "'";
if ($_is_first_file_download_url) {
$player_sources .= ",'default': 'true'";
}
$player_sources .= '}';
// Close this source.
}
$_file_download_url['smil']['height'] = (int) $_file_download_url_label;
// e.g., `720p-HD` becomes `720`.
if (!$_file_download_url['smil']['height']) {
$_file_download_url['smil']['height'] = 720;
}
示例11: __construct
//.........这里部分代码省略.........
echo '</form>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '<tr>' . "\n";
echo '<td colspan="2">' . "\n";
echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
echo '<strong>WordPress Shortcode:</strong> (recommended for both the WordPress Visual & HTML Editors)<br />' . "\n";
$ws_plugin__s2member_pro_temp_s = trim(c_ws_plugin__s2member_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/alipay-ccaps-checkout-button-shortcode.php")));
$ws_plugin__s2member_pro_temp_s = preg_replace("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_refs(esc_attr($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_pro_temp_s);
echo '<input type="text" autocomplete="off" id="ws-plugin--s2member-pro-ccap-shortcode" value="' . format_to_edit($ws_plugin__s2member_pro_temp_s) . '" onclick="this.select ();" class="monospace" />' . "\n";
echo '</form>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
}
echo '<div class="ws-menu-page-group" title="AliPay Member Registration Access Links">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-reg-links-section">' . "\n";
echo '<h3>Registration Access Link Generator (for Customer Service)</h3>' . "\n";
echo '<p>s2Member automatically generates Registration Access Links for your Customers after checkout, and also sends them a link in a Confirmation Email. However, if you ever need to deal with a Customer Service issue that requires a new Registration Access Link to be created manually, you can use this tool for that. Alternatively, you can create their account yourself/manually by going to <strong>Users ⥱ Add New</strong>. Either of these methods will work fine.</p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<td>' . "\n";
echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
echo '<p>Paid Membership Level#: <select id="ws-plugin--s2member-pro-reg-link-level">' . "\n";
for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
echo '<option value="' . $n . '">s2Member Level #' . $n . '</option>' . "\n";
}
echo '</select></p>' . "\n";
echo '<p>Paid Subscr. ID: <input type="text" autocomplete="off" id="ws-plugin--s2member-pro-reg-link-subscr-id" value="" size="50" /> <a href="#" onclick="alert(\'The Customer\\\'s Paid Subscr. ID ( aka: AliPay Trade No. ) must be unique. This value can be obtained from inside your AliPay account. Each paying Customer MUST be associated with a unique Paid Subscr. ID. If the Customer is NOT associated with a Paid Subscr. ID, you will need to generate a unique value for this field on your own. But keep in mind, s2Member will be unable to maintain future communication with the AliPay IPN (i.e., Notification) service if this value does not reflect a real Paid Subscr. ID that exists in your AliPay transaction log.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
echo '<p>Custom String Value: <input type="text" autocomplete="off" id="ws-plugin--s2member-pro-reg-link-custom" value="' . esc_attr($_SERVER["HTTP_HOST"]) . '" size="30" /> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a> <input type="button" value="Generate Access Link" onclick="ws_plugin__s2member_pro_alipayRegLinkGenerate();" /> <img id="ws-plugin--s2member-pro-reg-link-loading" src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
echo '<p' . (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '>Custom Capabilities (comma-delimited) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member ⥱ API Scripting ⥱ Custom Capabilities.\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-pro-reg-link-ccaps" size="40" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \\-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></p>' . "\n";
echo '<p>Fixed Term Length (for Buy Now transactions): <input type="text" autocomplete="off" id="ws-plugin--s2member-pro-reg-link-fixed-term" value="" size="10" /> <a href="#" onclick="alert(\'You may configure a Fixed Term Length in this field. This way the Customer\\\'s Membership Access is automatically revoked by s2Member at the appropriate time. This will be a numeric value, followed by a space, then a single letter.\\n\\nHere are some examples:\\n\\n1 D (this means 1 Day)\\n1 W (this means 1 Week)\\n1 M (this means 1 Month)\\n1 Y (this means 1 Year)\\n1 L (this means 1 Lifetime)\'); return false;">[?]</a></p>' . "\n";
echo '<p id="ws-plugin--s2member-pro-reg-link" class="monospace" style="display:none;"></p>' . "\n";
echo '</form>' . "\n";
echo '</td>' . "\n";
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
echo '</div>' . "\n";
echo '<div class="ws-menu-page-group" title="AliPay Specific Post/Page (Buy Now) Buttons">' . "\n";
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-sp-buttons-section">' . "\n";
echo '<h3>Button Code Generator For Specific Post/Page Buttons</h3>' . "\n";
echo '<p>s2Member now supports an additional layer of functionality (very powerful), which allows you to sell access to specific Posts/Pages that you\'ve created in WordPress. Specific Post/Page Access works independently from Member Level Access. That is, you can sell an unlimited number of Posts/Pages using "Buy Now" Buttons, and your Customers will NOT be required to have a Membership Account with your site in order to receive access. If they are already a Member, that\'s fine, but they won\'t need to be.</p>' . "\n";
echo '<p>In other words, Customers will NOT need to login, just to receive access to the Specific Post/Page they purchased access to. s2Member will immediately redirect the Customer to the Specific Post/Page after checkout is completed successfully. An email is also sent to the Customer with a link (see: <strong>s2Member ⥱ AliPay Options ⥱ Specific Post/Page Email</strong>). Authentication is handled automatically through self-expiring links, good for 72 hours by default.</p>' . "\n";
echo '<p>Specific Post/Page Access, is sort of like selling a product. Only, instead of shipping anything to the Customer, you just give them access to a specific Post/Page on your site; one that you created in WordPress. A Specific Post/Page that is protected by s2Member, might contain a download link for your eBook, access to file & music downloads, access to additional support services, and the list goes on and on. The possibilities with this are endless; as long as your digital product can be delivered through access to a WordPress Post/Page that you\'ve created. To protect Specific Posts/Pages, please see: <strong>s2Member ⥱ Restriction Options ⥱ Specific Post/Page Access</strong>. Once you\'ve configured your Specific Post/Page Restrictions, those Posts/Pages will be available in the menus below.</p>' . "\n";
echo '<p>Very simple. All you do is customize the form fields provided, for each Post/Page that you plan to sell. Then press (Generate Button Code). These special AliPay Buttons are customized to work with s2Member seamlessly. You can even Package Additional Posts/Pages together into one transaction. <em><strong>Please note:</strong> buttons are NOT saved here. This is only a Button Generator. Once you\'ve generated your Button, copy/paste it into your WordPress Editor, wherever you feel it would be most appropriate. If you lose your Button Code, you\'ll need to come back & re-generate a new one.</em></p>' . "\n";
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
echo '<th class="ws-menu-page-th-side">' . "\n";
echo '<label for="ws-plugin--s2member-pro-sp-shortcode">' . "\n";
echo 'Button Code<br />Specific Posts/Pages:<br /><br />' . "\n";
echo '</label>' . "\n";
echo '</th>' . "\n";
echo '<td>' . "\n";
echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
echo '<p><select id="ws-plugin--s2member-pro-sp-leading-id">' . "\n";
echo '<option value="">— Select a Leading Post/Page that you\'ve protected —</option>' . "\n";
$ws_plugin__s2member_pro_temp_a_singulars = c_ws_plugin__s2member_utils_gets::get_all_singulars_with_sp("exclude-conflicts");
foreach ($ws_plugin__s2member_pro_temp_a_singulars as $ws_plugin__s2member_pro_temp_o) {
echo '<option value="' . esc_attr($ws_plugin__s2member_pro_temp_o->ID) . '">' . esc_html($ws_plugin__s2member_pro_temp_o->post_title) . '</option>' . "\n";
示例12: __construct
//.........这里部分代码省略.........
echo '<td>' . "\n";
echo '<form onsubmit="return false;">' . "\n";
echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual & HTML Editors )<br />' . "\n";
$ws_plugin__s2member_pro_temp_s = trim(c_ws_plugin__s2member_utilities::evl(file_get_contents(dirname(dirname(__FILE__)) . "/templates/shortcodes/authnet-cancellation-form-shortcode.php")));
echo '<input type="text" autocomplete="off" id="ws-plugin--s2member-pro-cancellation-shortcode" value="' . format_to_edit($ws_plugin__s2member_pro_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
echo '</form>' . "\n";
echo '</td>' . "\n";
/**/
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
/**/
echo '</div>' . "\n";
/**/
echo '<div class="ws-menu-page-group" title="Authorize.Net® Member Registration Access Links">' . "\n";
/**/
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-reg-links-section">' . "\n";
echo '<h3>Registration Access Link Generator ( for Customer Service )</h3>' . "\n";
echo '<p>s2Member Pro Forms consolidate the Registration/Checkout process into a single-step solution, so it is unlikely that you will ever need this tool. That being said, if you DO need to deal with a Customer Service issue that requires a simple paid Registration Access Link to be created manually, you can use this tool for that. Alternatively, you can create their account yourself/manually by going to <code>s2Member -> Add A Member</code>. Either of these methods will work fine.</p>' . "\n";
/**/
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
/**/
echo '<td>' . "\n";
echo '<form onsubmit="return false;">' . "\n";
echo '<p>Paid Membership Level#: <select id="ws-plugin--s2member-pro-reg-link-level">' . "\n";
for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
echo '<option value="' . $n . '">s2Member Level #' . $n . '</option>' . "\n";
}
echo '</select></p>' . "\n";
echo '<p>Paid Subscr. ID: <input type="text" autocomplete="off" id="ws-plugin--s2member-pro-reg-link-subscr-id" value="" size="50" /> <a href="#" onclick="alert(\'The Customer\\\'s Paid Subscr. ID ( aka: Authorize.Net® Subscription ID or Transaction ID ) must be unique. This value can be obtained from inside your Authorize.Net® account. Each paying Customer MUST be associated with a unique Paid Subscr. ID. If the Customer is NOT associated with a Paid Subscr. ID, you will need to generate a unique value for this field on your own. But keep in mind, s2Member will be unable to maintain future communication with the Authorize.Net® Silent Post and ARB services if this value does not reflect a real Paid Subscr. ID, one that exists in your Authorize.Net® transaction log.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
echo '<p>Custom String Value: <input type="text" autocomplete="off" id="ws-plugin--s2member-pro-reg-link-custom" value="' . esc_attr($_SERVER["HTTP_HOST"]) . '" size="30" /> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq(esc_attr($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a> <input type="button" value="Generate Access Link" onclick="ws_plugin__s2member_pro_authnetRegLinkGenerate();" class="button-primary" /> <img id="ws-plugin--s2member-pro-reg-link-loading" src="' . esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
echo '<p' . (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site() ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-pro-reg-link-ccaps" size="40" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \\-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></p>' . "\n";
echo '<p>Fixed Term Length ( for Buy Now transactions ): <input type="text" autocomplete="off" id="ws-plugin--s2member-pro-reg-link-fixed-term" value="" size="10" /> <a href="#" onclick="alert(\'If the Customer purchased Membership through a Buy Now transaction ( i.e. there is no Initial/Trial Period and no recurring charges for ongoing access ), you may configure a Fixed Term Length in this field. This way the Customer\\\'s Membership Access is revoked by s2Member at the appropriate time. This will be a numeric value, followed by a space, then a single letter.\\n\\nHere are some examples:\\n\\n1 D ( this means 1 Day )\\n1 W ( this means 1 Week )\\n1 M ( this means 1 Month )\\n1 Y ( this means 1 Year )\\n1 L ( this means 1 Lifetime )\'); return false;">[?]</a></p>' . "\n";
echo '<p id="ws-plugin--s2member-pro-reg-link" style="font-family:Consolas, monospace; display:none;"></p>' . "\n";
echo '</form>' . "\n";
echo '</td>' . "\n";
/**/
echo '</tr>' . "\n";
echo '</tbody>' . "\n";
echo '</table>' . "\n";
echo '</div>' . "\n";
/**/
echo '</div>' . "\n";
/**/
echo '<div class="ws-menu-page-group" title="Authorize.Net® Specific Post/Page (Buy Now) Forms">' . "\n";
/**/
echo '<div class="ws-menu-page-section ws-plugin--s2member-pro-sp-forms-section">' . "\n";
echo '<h3>Pro Form Generator For Specific Post/Page Forms</h3>' . "\n";
echo '<p>s2Member now supports an additional layer of functionality ( very powerful ), which allows you to sell access to specific Posts/Pages that you\'ve created in WordPress®. Specific Post/Page Access works independently from Member Level Access. That is, you can sell an unlimited number of Posts/Pages using "Buy Now" functionality. Your Customers will NOT be required to have a Membership Account with your site in order to receive access. If they are already a Member, that\'s fine, but they won\'t need to be.</p>' . "\n";
echo '<p>In other words, Customers will NOT need to login, just to receive access to the Specific Post/Page they purchased access to. s2Member will immediately redirect the Customer to the Specific Post/Page after checkout is completed successfully. An email is also sent to the Customer with a link ( see: <code>s2Member -> Authorize.Net® Options -> Specific Post/Page Email</code> ). Authentication is handled automatically through self-expiring links, good for 72 hours by default.</p>' . "\n";
echo '<p>Specific Post/Page Access, is sort of like selling a product. Only, instead of shipping anything to the Customer, you just give them access to a specific Post/Page on your site; one that you created in WordPress®. A Specific Post/Page that is protected by s2Member, might contain a download link for your eBook, access to file & music downloads, access to additional support services, and the list goes on and on. The possibilities with this are endless; as long as your digital product can be delivered through access to a WordPress® Post/Page that you\'ve created. To protect Specific Posts/Pages, please see: <code>s2Member -> Restriction Options -> Specific Post/Page Access</code>. Once you\'ve configured your Specific Post/Page Restrictions, those Posts/Pages will be available in the menus below.</p>' . "\n";
echo '<p>Very simple. All you do is customize the form fields provided, for each Post/Page that you plan to sell. Then press (Generate Form Code). These special Authorize.Net® Forms are customized to work with s2Member seamlessly. You can even Package Additional Posts/Pages together into one transaction. <em>* Forms are NOT saved here. This is only a Form Generator. Once you\'ve generated your Form, copy/paste it into any Post/Page you like. You\'ll want to provide your visitors with a link to the Post/Page where this Form is located.</em></p>' . "\n";
/**/
echo '<table class="form-table">' . "\n";
echo '<tbody>' . "\n";
echo '<tr>' . "\n";
/**/
echo '<td>' . "\n";
echo '<form onsubmit="return false;">' . "\n";
/**/
echo '<p><select id="ws-plugin--s2member-pro-sp-leading-id">' . "\n";
echo '<option value="">— Select a Leading Post/Page that you\'ve protected —</option>' . "\n";
/**/
示例13: ___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";
//.........这里部分代码省略.........
示例14: js_w_globals
/**
* Outputs JS for theme integration.
*
* Be sure s2Member's API Constants are already defined before firing this.
*
* @package s2Member\CSS_JS
* @since 3.5
*
* @attaches-to ``add_action("init");``
*
* @return null Or exits script execution after loading JS w/Globals.
*/
public static function js_w_globals()
{
do_action("ws_plugin__s2member_before_js_w_globals", get_defined_vars());
/**/
if (!empty($_GET["ws_plugin__s2member_js_w_globals"])) {
status_header(200);
/* 200 OK status header. */
/**/
header("Content-Type: text/javascript; charset=utf-8");
header("Expires: " . gmdate("D, d M Y H:i:s", strtotime("+1 week")) . " GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: max-age=604800");
header("Pragma: public");
/**/
eval('while (@ob_end_clean ());');
/**/
include_once dirname(dirname(__FILE__)) . "/jquery/jquery.sprintf/jquery.sprintf-min.js";
/**/
echo "\n";
/* Add a line break before writing JavaScript Globals to file. */
/**/
echo "var S2MEMBER_VERSION = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_VERSION) . "',";
/**/
echo "S2MEMBER_CURRENT_USER_LOGIN_COUNTER = " . S2MEMBER_CURRENT_USER_LOGIN_COUNTER . ",";
/**/
echo "S2MEMBER_CURRENT_USER_IS_LOGGED_IN = " . (S2MEMBER_CURRENT_USER_IS_LOGGED_IN ? "true" : "false") . ",";
echo "S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER = " . (S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER ? "true" : "false") . ",";
/**/
echo "S2MEMBER_CURRENT_USER_ACCESS_LEVEL = " . S2MEMBER_CURRENT_USER_ACCESS_LEVEL . ",";
echo "S2MEMBER_CURRENT_USER_ACCESS_LABEL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_CURRENT_USER_ACCESS_LABEL) . "',";
/**/
echo "S2MEMBER_CURRENT_USER_SUBSCR_ID = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_CURRENT_USER_SUBSCR_ID) . "',";
echo "S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID) . "',";
echo "S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY) . "',";
echo "S2MEMBER_CURRENT_USER_CUSTOM = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_CURRENT_USER_CUSTOM) . "',";
/**/
echo "S2MEMBER_CURRENT_USER_REGISTRATION_TIME = " . S2MEMBER_CURRENT_USER_REGISTRATION_TIME . ",";
echo "S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME = " . S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME . ",";
/**/
echo "S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS = " . S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS . ",";
echo "S2MEMBER_CURRENT_USER_REGISTRATION_DAYS = " . S2MEMBER_CURRENT_USER_REGISTRATION_DAYS . ",";
/**/
echo "S2MEMBER_CURRENT_USER_DISPLAY_NAME = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_CURRENT_USER_DISPLAY_NAME) . "',";
echo "S2MEMBER_CURRENT_USER_FIRST_NAME = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_CURRENT_USER_FIRST_NAME) . "',";
echo "S2MEMBER_CURRENT_USER_LAST_NAME = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_CURRENT_USER_LAST_NAME) . "',";
/**/
echo "S2MEMBER_CURRENT_USER_LOGIN = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_CURRENT_USER_LOGIN) . "',";
echo "S2MEMBER_CURRENT_USER_EMAIL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_CURRENT_USER_EMAIL) . "',";
echo "S2MEMBER_CURRENT_USER_IP = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_CURRENT_USER_IP) . "',";
echo "S2MEMBER_CURRENT_USER_REGISTRATION_IP = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_CURRENT_USER_REGISTRATION_IP) . "',";
/**/
echo "S2MEMBER_CURRENT_USER_ID = " . S2MEMBER_CURRENT_USER_ID . ",";
echo "S2MEMBER_CURRENT_USER_FIELDS = " . S2MEMBER_CURRENT_USER_FIELDS . ",";
/**/
echo "S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED = " . S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED . ",";
echo "S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED = " . (S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED ? "true" : "false") . ",";
echo "S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY = " . S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY . ",";
echo "S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS = " . S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS . ",";
/**/
echo "S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID = " . S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_ID . ",";
echo "S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID = " . S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID . ",";
echo "S2MEMBER_LOGIN_WELCOME_PAGE_ID = " . S2MEMBER_LOGIN_WELCOME_PAGE_ID . ",";
/**/
echo "S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL) . "',";
echo "S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL) . "',";
echo "S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL) . "',";
echo "S2MEMBER_LOGIN_WELCOME_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_LOGIN_WELCOME_PAGE_URL) . "',";
echo "S2MEMBER_LOGOUT_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_LOGOUT_PAGE_URL) . "',";
echo "S2MEMBER_LOGIN_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(S2MEMBER_LOGIN_PAGE_URL) . "',";
/**/
for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
if (defined($S2MEMBER_LEVELn_LABEL = "S2MEMBER_LEVEL" . $n . "_LABEL")) {
echo $S2MEMBER_LEVELn_LABEL . " = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(constant($S2MEMBER_LEVELn_LABEL)) . "',";
}
}
/**/
for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
if (defined($S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED = "S2MEMBER_LEVEL" . $n . "_FILE_DOWNLOADS_ALLOWED")) {
echo $S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED . " = " . constant($S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED) . ",";
}
}
/**/
for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++) {
if (defined($S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS = "S2MEMBER_LEVEL" . $n . "_FILE_DOWNLOADS_ALLOWED_DAYS")) {
echo $S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS . " = " . constant($S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS) . ",";
}
}
/**/
//.........这里部分代码省略.........
示例15: clickbank_return
//.........这里部分代码省略.........
$rtn["custom"] = $s2vars["s2_custom"];
/**/
$rtn["period1"] = $s2vars["s2_p1"];
$rtn["period3"] = $s2vars["s2_p3"];
/**/
$rtn["mc_amount1"] = number_format($order["amount"], 2, ".", "");
$rtn["mc_amount3"] = number_format($order["rebillAmount"], 2, ".", "");
/**/
$rtn["mc_currency"] = strtoupper($order["currency"]);
$rtn["tax"] = "0.00";
/* No tax. */
/**/
$rtn["payer_email"] = $order["email"];
$rtn["first_name"] = ucwords(strtolower($order["firstName"]));
$rtn["last_name"] = ucwords(strtolower($order["lastName"]));
/**/
$rtn["option_name1"] = $s2vars["s2_referencing"] ? "Referencing Customer ID" : "Originating Domain";
$rtn["option_selection1"] = $s2vars["s2_referencing"] ? $s2vars["s2_referencing"] : $_SERVER["HTTP_HOST"];
/**/
$rtn["option_name2"] = "Customer IP Address";
$rtn["option_selection2"] = $s2vars["s2_customer_ip"];
/**/
$rtn["item_number"] = $s2vars["s2_invoice"];
$rtn["item_name"] = $s2vars["s2_desc"];
/**/
$rtn_q = "&s2member_paypal_proxy=clickbank&s2member_paypal_proxy_use=standard-emails";
if (!empty($_GET["s2member_pro_clickbank_return_success"])) {
$rtn_q .= "&s2member_paypal_return_success=" . rawurlencode(trim(stripslashes($_GET["s2member_pro_clickbank_return_success"])));
}
/**/
$rtn_r = add_query_arg(urlencode_deep($rtn), site_url("/?s2member_pro_clickbank_return&s2member_paypal_return=1" . $rtn_q));
$rtn_r = c_ws_plugin__s2member_utils_urls::add_s2member_sig($rtn_r, "s2member_paypal_proxy_verification");
/**/
$clickbank["s2member_log"][] = $rtn_r;
/**/
wp_redirect($rtn_r);
} else {
$clickbank["s2member_log"][] = "Unexpected txnType. The ClickBank® txnType did not match a required action.";
/**/
$clickbank["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
/**/
echo '<script type="text/javascript">' . "\n";
echo "alert('" . c_ws_plugin__s2member_utils_strings::esc_js_sq(_x("ERROR: Unexpected txnType. Please contact Support for assistance.\n\nThe ClickBank® txnType did not match a required action.", "s2member-front", "s2member")) . "');" . "\n";
echo "window.location = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(home_url("/")) . "';";
echo '</script>' . "\n";
}
}
} else {
$clickbank["s2member_log"][] = "Unable to obtain API vars. The ClickBank® API may NOT have data for this order yet. Or, your ClickBank® API Keys are NOT configured properly under `s2Member -> ClickBank® Options`.";
$clickbank["s2member_log"][] = var_export($_REQUEST, true);
/* Recording ``$_POST`` + ``$_GET`` vars for analysis and debugging. */
/**/
$clickbank["s2member_log"][] = "Return-Data reformulated. Piping through s2Member's core/standard PayPal® processor with `proxy_use` ( `ty-email` ).";
$clickbank["s2member_log"][] = "Please check PayPal® RTN logs for further processing details.";
/**/
$rtn_q = "&s2member_paypal_proxy=clickbank&s2member_paypal_proxy_use=standard-emails,ty-email";
if (!empty($_GET["s2member_pro_clickbank_return_success"])) {
$rtn_q .= "&s2member_paypal_return_success=" . rawurlencode(trim(stripslashes($_GET["s2member_pro_clickbank_return_success"])));
}
/**/
$rtn_r = site_url("/?s2member_pro_clickbank_return&s2member_paypal_return=1" . $rtn_q);
$rtn_r = c_ws_plugin__s2member_utils_urls::add_s2member_sig($rtn_r, "s2member_paypal_proxy_verification");
/**/
$clickbank["s2member_log"][] = $rtn_r;
/**/
wp_redirect($rtn_r);
}
} else {
$clickbank["s2member_log"][] = "Unable to verify POST vars. This is most likely related to an invalid ClickBank® configuration. Please check: s2Member -> ClickBank® Options.";
$clickbank["s2member_log"][] = "If you're absolutely SURE that your ClickBank® configuration is valid, you may want to run some tests on your server, just to be sure \$_POST variables are populated, and that your server is able to connect to ClickBank® over an HTTPS connection.";
$clickbank["s2member_log"][] = "s2Member uses the WP_Http class for remote connections; which will try to use cURL first, and then fall back on the FOPEN method when cURL is not available. On a Windows® server, you may have to disable your cURL extension. Instead, set allow_url_fopen = yes in your php.ini file. The cURL extension (usually) does NOT support SSL connections on a Windows® server.";
$clickbank["s2member_log"][] = var_export($_REQUEST, true);
/* Recording _POST + _GET vars for analysis and debugging. */
/**/
$clickbank["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
/**/
echo '<script type="text/javascript">' . "\n";
echo "alert('" . c_ws_plugin__s2member_utils_strings::esc_js_sq(_x("ERROR: Unable to verify POST vars. Please contact Support for assistance.\n\nThis is most likely related to an invalid ClickBank® configuration. If you are the site owner, please check: s2Member -> ClickBank® Options.", "s2member-front", "s2member")) . "');" . "\n";
echo "window.location = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq(home_url("/")) . "';";
echo '</script>' . "\n";
}
/**/
$logv = c_ws_plugin__s2member_utilities::ver_details();
$logm = c_ws_plugin__s2member_utilities::mem_details();
$log4 = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . "\nUser-Agent: " . $_SERVER["HTTP_USER_AGENT"];
$log4 = is_multisite() && !is_main_site() ? ($_log4 = $current_blog->domain . $current_blog->path) . "\n" . $log4 : $log4;
$log2 = is_multisite() && !is_main_site() ? "clickbank-rtn-4-" . trim(preg_replace("/[^a-z0-9]/i", "-", $_log4), "-") . ".log" : "clickbank-rtn.log";
/**/
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"]) {
if (is_dir($logs_dir = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"])) {
if (is_writable($logs_dir) && c_ws_plugin__s2member_utils_logs::archive_oversize_log_files()) {
file_put_contents($logs_dir . "/" . $log2, $logv . "\n" . $logm . "\n" . $log4 . "\n" . var_export($clickbank, true) . "\n\n", FILE_APPEND);
}
}
}
/**/
exit;
/* Exit now. */
}
}