当前位置: 首页>>代码示例>>PHP>>正文


PHP c_ws_plugin__s2member_utils_conds::pro_is_installed方法代码示例

本文整理汇总了PHP中c_ws_plugin__s2member_utils_conds::pro_is_installed方法的典型用法代码示例。如果您正苦于以下问题:PHP c_ws_plugin__s2member_utils_conds::pro_is_installed方法的具体用法?PHP c_ws_plugin__s2member_utils_conds::pro_is_installed怎么用?PHP c_ws_plugin__s2member_utils_conds::pro_is_installed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在c_ws_plugin__s2member_utils_conds的用法示例。


在下文中一共展示了c_ws_plugin__s2member_utils_conds::pro_is_installed方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: cp

 /**
  * s2Member's PayPal Auto-Return/PDT handler (inner processing routine).
  *
  * @package s2Member\PayPal
  * @since 110720
  *
  * @param array $vars Required. An array of defined variables passed by {@link s2Member\PayPal\c_ws_plugin__s2member_paypal_return_in::paypal_return()}.
  * @return array|bool The original ``$paypal`` array passed in (extracted) from ``$vars``, or false when conditions do NOT apply.
  */
 public static function cp($vars = array())
 {
     extract($vars);
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_during_paypal_return_before_no_return_data", get_defined_vars());
     unset($__refs, $__v);
     $paypal["s2member_log"][] = "No Return-Data. Customer MUST wait for Email Confirmation.";
     $paypal["s2member_log"][] = "Note. This can sometimes happen when/if you are offering an Initial/Trial Period. There are times when a Payment Gateway will NOT supply s2Member with any data immediately after checkout. When/if this happens, s2Member must process the transaction via IPN only (i.e. behind-the-scene), and the Customer must wait for Email Confirmation in these cases.";
     $paypal["s2member_log"][] = var_export($_REQUEST, true);
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_during_paypal_return_during_no_return_data", get_defined_vars());
     unset($__refs, $__v);
     if ($custom_success_redirection) {
         $paypal["s2member_log"][] = "Redirecting Customer to a custom URL: " . $custom_success_redirection . ".";
         wp_redirect($custom_success_redirection);
     } else {
         $paypal["s2member_log"][] = "Redirecting Customer to the Home Page (after asking Customer to check their email).";
         echo c_ws_plugin__s2member_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Thank you! (you MUST check your email before proceeding).</strong><br /><br />* Note: It can take <em>(up to 15 minutes)</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.', "s2member-front", "s2member") . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] || c_ws_plugin__s2member_utils_conds::pro_is_installed() && !empty($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]) ? '<br /><br />' . _x('<strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).', "s2member-front", "s2member") : ''), _x("Back To Home Page", "s2member-front", "s2member"), home_url("/"));
     }
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_during_paypal_return_after_no_return_data", get_defined_vars());
     unset($__refs, $__v);
     return apply_filters("c_ws_plugin__s2member_paypal_return_in_no_tx_data", $paypal, get_defined_vars());
 }
开发者ID:novichkovv,项目名称:candoweightloss,代码行数:39,代码来源:paypal-return-in-no-tx-data.inc.php

示例2: cp

 /**
  * s2Member's PayPal® Auto-Return/PDT handler ( inner processing routine ).
  *
  * @package s2Member\PayPal
  * @since 110720
  *
  * @param array $vars Required. An array of defined variables passed by {@link s2Member\PayPal\c_ws_plugin__s2member_paypal_return_in::paypal_return()}.
  * @return array|bool The original ``$paypal`` array passed in ( extracted ) from ``$vars``, or false when conditions do NOT apply.
  */
 public static function cp($vars = array())
 {
     extract($vars);
     /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
     /**/
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__s2member_during_paypal_return_before_explicit_ty_email", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     $paypal["s2member_log"][] = "Customer must wait for Email Confirmation `proxy_use`: ( `ty-email` ).";
     /**/
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__s2member_during_paypal_return_during_explicit_ty_email", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     if ($custom_success_redirection) {
         /* Using a custom success redirection URL? */
         $paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection . ". However, the Customer MUST wait for Email Confirmation `proxy_use`: ( `ty-email` ).";
     } else {
         /* Else we use the default redirection URL for this scenario, which is the Home Page. */
         $paypal["s2member_log"][] = "Redirecting Customer to the Home Page. Customer must wait for Email Confirmation `proxy_use`: ( `ty-email` ).";
     }
     /**/
     echo c_ws_plugin__s2member_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Thank you! ( you MUST check your email before proceeding ).</strong><br /><br />* Note: It can take <em>( up to 15 minutes )</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.', "s2member-front", "s2member") . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] || c_ws_plugin__s2member_utils_conds::pro_is_installed() && !empty($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]) ? '<br /><br />' . _x('<strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).', "s2member-front", "s2member") : ''), $custom_success_redirection ? _x("Check Your Email ( Then Click Here )", "s2member-front", "s2member") : esc_html("Back To Home Page", "s2member"), $custom_success_redirection ? $custom_success_redirection : home_url("/"));
     /**/
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__s2member_during_paypal_return_after_explicit_ty_email", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     return apply_filters("c_ws_plugin__s2member_paypal_return_in_proxy_ty_email", $paypal, get_defined_vars());
 }
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:43,代码来源:paypal-return-in-proxy-ty-email.inc.php

示例3: cp

 /**
  * s2Member's PayPal Auto-Return/PDT handler (inner processing routine).
  *
  * @package s2Member\PayPal
  * @since 110720
  *
  * @param array $vars Required. An array of defined variables passed by {@link s2Member\PayPal\c_ws_plugin__s2member_paypal_return_in::paypal_return()}.
  * @return array|bool The original ``$paypal`` array passed in (extracted) from ``$vars``, or false when conditions do NOT apply.
  */
 public static function cp($vars = array())
 {
     extract($vars, EXTR_OVERWRITE | EXTR_REFS);
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_during_paypal_return_before_explicit_ty_email", get_defined_vars());
     unset($__refs, $__v);
     $paypal["s2member_log"][] = "Customer MUST wait for Email Confirmation—`proxy_use`: ( `ty-email` ).";
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_during_paypal_return_during_explicit_ty_email", get_defined_vars());
     unset($__refs, $__v);
     if ($custom_success_redirection) {
         $paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection . ".";
         wp_redirect($custom_success_redirection);
     } else {
         $paypal["s2member_log"][] = "Redirecting Customer to the Home Page (after asking Customer to check their email).";
         echo c_ws_plugin__s2member_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Thank you! (you MUST check your email before proceeding).</strong><br /><br />* Note: It can take <em>(up to 15 minutes)</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.', "s2member-front", "s2member") . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] || c_ws_plugin__s2member_utils_conds::pro_is_installed() && !empty($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]) ? '<br /><br />' . _x('<strong>* Sandbox Mode *:</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).', "s2member-front", "s2member") : ''), _x("Back To Home Page", "s2member-front", "s2member"), home_url("/"));
     }
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_during_paypal_return_after_explicit_ty_email", get_defined_vars());
     unset($__refs, $__v);
     return apply_filters("c_ws_plugin__s2member_paypal_return_in_proxy_ty_email", $paypal, get_defined_vars());
 }
开发者ID:adnandot,项目名称:intenseburn,代码行数:37,代码来源:paypal-return-in-proxy-ty-email.inc.php

示例4: __construct

 public function __construct()
 {
     if (c_ws_plugin__s2member_utils_conds::pro_is_installed()) {
         c_ws_plugin__s2member_pro_menu_pages::mms_ops_page_display();
         return;
         // Stop here.
     }
     echo '<div class="wrap ws-menu-page">' . "\n";
     echo '<div class="ws-menu-page-toolbox">' . "\n";
     c_ws_plugin__s2member_menu_pages_tb::display();
     echo '</div>' . "\n";
     echo '<h2>Multisite Config</h2>' . "\n";
     echo '<table class="ws-menu-page-table">' . "\n";
     echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
     echo '<tr class="ws-menu-page-table-tr">' . "\n";
     echo '<td class="ws-menu-page-table-l">' . "\n";
     if (is_multisite() && is_main_site()) {
         echo '<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="float:right; margin:25px 0 0 25px; border:0;" />' . "\n";
         if (file_exists($ws_plugin__s2member_temp = dirname(dirname(dirname(__FILE__))) . "/readme-ms.txt")) {
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             if (!function_exists("NC_Markdown")) {
                 include_once dirname(dirname(__FILE__)) . "/externals/markdown/nc-markdown.inc.php";
             }
             $ws_plugin__s2member_temp = file_get_contents($ws_plugin__s2member_temp);
             $ws_plugin__s2member_temp = preg_replace("/(\\=)( )(.+?)( )(\\=)/", "<h3>\$3</h3>", $ws_plugin__s2member_temp);
             $ws_plugin__s2member_temp = NC_Markdown($ws_plugin__s2member_temp);
             echo '<div style="max-width:1024px;">';
             echo preg_replace("/(\\<a)( href)/i", "\$1" . ' target="_blank" rel="nofollow external"' . "\$2", $ws_plugin__s2member_temp);
             echo '</div>';
         }
     } else {
         echo '<p style="margin-top:0;">Your WordPress installation does not have Multisite Networking enabled.<br />Which is perfectly OK :-) Multisite Networking is 100% completely optional.</p>' . "\n";
         echo '<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="float:right; margin:25px 0 0 25px; border:0;" />' . "\n";
         if (file_exists($ws_plugin__s2member_temp = dirname(dirname(dirname(__FILE__))) . "/readme-ms.txt")) {
             echo '<div class="ws-menu-page-hr"></div>' . "\n";
             if (!function_exists("NC_Markdown")) {
                 include_once dirname(dirname(__FILE__)) . "/externals/markdown/nc-markdown.inc.php";
             }
             $ws_plugin__s2member_temp = file_get_contents($ws_plugin__s2member_temp);
             $ws_plugin__s2member_temp = preg_replace("/(\\=)( )(.+?)( )(\\=)/", "<h3>\$3</h3>", $ws_plugin__s2member_temp);
             $ws_plugin__s2member_temp = NC_Markdown($ws_plugin__s2member_temp);
             echo '<div style="max-width:1024px;">';
             echo preg_replace("/(\\<a)( href)/i", "\$1" . ' target="_blank" rel="nofollow external"' . "\$2", $ws_plugin__s2member_temp);
             echo '</div>';
         }
     }
     echo '</td>' . "\n";
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__s2member_menu_pages_rs::display();
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
 }
开发者ID:codeforest,项目名称:s2member,代码行数:55,代码来源:mms-ops.inc.php

示例5: cp

 /**
  * s2Member's PayPal® Auto-Return/PDT handler ( inner processing routine ).
  *
  * @package s2Member\PayPal
  * @since 110720
  *
  * @param array $vars Required. An array of defined variables passed by {@link s2Member\PayPal\c_ws_plugin__s2member_paypal_return_in::paypal_return()}.
  * @return array|bool The original ``$paypal`` array passed in ( extracted ) from ``$vars``, or false when conditions do NOT apply.
  */
 public static function cp($vars = array())
 {
     extract($vars);
     /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
     /**/
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__s2member_during_paypal_return_before_no_return_data", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     $paypal["s2member_log"][] = "No Return-Data. Customer must wait for Email Confirmation.";
     /**/
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__s2member_during_paypal_return_during_no_return_data", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     if ($custom_success_redirection) {
         /* Using a custom success redirection URL? */
         $paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection . ". However, the Customer MUST wait for Email Confirmation.";
     } else {
         /* Else we use the default redirection URL for this scenario, which is the Home Page. */
         $paypal["s2member_log"][] = "Redirecting Customer to the Home Page. Customer must wait for Email Confirmation.";
     }
     /**/
     $paypal["s2member_log"][] = "Note. This can sometimes happen when/if you are offering a free Trial Period. There are times when a Payment Gateway will NOT supply s2Member with any data immediately after checkout. When/if this happens, s2Member must process the transaction via IPN only ( i.e. behind-the-scene ), and the Customer must wait for Email Confirmation in these cases.";
     $paypal["s2member_log"][] = var_export($_REQUEST, true);
     /* Recording _POST + _GET vars for analysis and debugging. */
     /**/
     echo c_ws_plugin__s2member_return_templates::return_template($paypal["subscr_gateway"], _x('<strong>Thank you! ( you MUST check your email before proceeding ).</strong><br /><br />* Note: It can take <em>( up to 15 minutes )</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.', "s2member-front", "s2member") . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] || c_ws_plugin__s2member_utils_conds::pro_is_installed() && !empty($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]) ? '<br /><br />' . _x('<strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).', "s2member-front", "s2member") : ''), $custom_success_redirection ? _x("Check Your Email ( Then Click Here )", "s2member-front", "s2member") : _x("Back To Home Page", "s2member-front", "s2member"), $custom_success_redirection ? $custom_success_redirection : home_url("/"));
     /**/
     eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
     do_action("ws_plugin__s2member_during_paypal_return_after_no_return_data", get_defined_vars());
     unset($__refs, $__v);
     /* Unset defined __refs, __v. */
     /**/
     return apply_filters("c_ws_plugin__s2member_paypal_return_in_no_tx_data", $paypal, get_defined_vars());
 }
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:47,代码来源:paypal-return-in-no-tx-data.inc.php

示例6: ver_details

 /**
  * String with all version details *( for PHP, WordPress®, s2Member, and Pro )*.
  *
  * @package s2Member\Utilities
  * @since 3.5
  *
  * @return str String with `PHP vX.XX :: WordPress® vX.XX :: s2Member® vX.XX :: s2Member® Pro vX.XX`.
  */
 public static function ver_details()
 {
     $details = "PHP v" . PHP_VERSION . " :: WordPress® v" . get_bloginfo("version") . " :: s2Member® v" . WS_PLUGIN__S2MEMBER_VERSION;
     $details .= c_ws_plugin__s2member_utils_conds::pro_is_installed() ? " :: s2Member® Pro v" . WS_PLUGIN__S2MEMBER_PRO_VERSION : "";
     /**/
     return $details;
     /* Return all details. */
 }
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:16,代码来源:utilities.inc.php

示例7: configure_user_registration

 /**
  * Configures all new Users.
  *
  * The Hook `user_register` is also fired by calling:
  * ``c_ws_plugin__s2member_registrations::ms_create_existing_user()`` and/or ``wpmu_create_user()``.
  *
  * This function also receives hand-offs from s2Member's handlers for these two Hooks:
  * `wpmu_activate_user` and `wpmu_activate_blog`.
  *
  * @package s2Member\Registrations
  * @since 3.5
  *
  * @attaches-to ``add_action("user_register");``
  *
  * @param int|str $user_id A numeric WordPress User ID.
  * @param str $password Optional in most cases. A User's plain text Password. If unspecified, attempts are made to collect the plain text Password from other sources.
  * @param array $meta Optional in most cases. Defaults to false. An array of meta data for a User/Member.
  * @return null No return value. Returns `null` in possible every scenario.
  *
  * @todo Impossible to delete cookies when fired inside: `/wp-activate.php`?
  */
 public static function configure_user_registration($user_id = FALSE, $password = FALSE, $meta = FALSE)
 {
     global $wpdb;
     global $pagenow;
     // We need this to detect the current administration page.
     global $current_site, $current_blog;
     // Adds support for Multisite Networking.
     static $email_config, $processed;
     // Static vars prevent duplicate processing.
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_before_configure_user_registration", get_defined_vars());
     unset($__refs, $__v);
     // With Multisite Networking, we need this to run on `user_register` ahead of `wpmu_activate_[user|blog]`.
     if (!isset($email_config) && ($email_config = true)) {
         // Anytime this routine is fired; we configure email.
         c_ws_plugin__s2member_email_configs::email_config();
     }
     // Configures `From:` email header.
     $_p = isset($_POST) ? $_POST : null;
     $rvs = isset($GLOBALS["ws_plugin__s2member_registration_vars"]) ? $GLOBALS["ws_plugin__s2member_registration_vars"] : null;
     if (!$processed) {
         if (is_array($_p) || is_array($meta) || is_array($rvs)) {
             if (!(is_multisite() && is_blog_admin() && $pagenow === "user-new.php" && isset($_p["noconfirmation"]) && is_super_admin() && !is_array($meta))) {
                 if (!(preg_match("/\\/wp-activate\\.php/", $_SERVER["REQUEST_URI"]) && !is_array($meta))) {
                     if (!(c_ws_plugin__s2member_utils_conds::bp_is_installed() && bp_is_activation_page() && !is_array($meta))) {
                         if (!(c_ws_plugin__s2member_utils_conds::pro_is_installed() && c_ws_plugin__s2member_pro_remote_ops::is_remote_op("create_user") && !is_array($rvs))) {
                             if ($user_id && is_object($user = new WP_User($user_id)) && !empty($user->ID) && ($user_id = $user->ID) && ($processed = true)) {
                                 settype($_p, "array") . settype($meta, "array") . settype($rvs, "array");
                                 $_p = c_ws_plugin__s2member_utils_strings::trim_deep(stripslashes_deep($_p));
                                 $meta = c_ws_plugin__s2member_utils_strings::trim_deep(stripslashes_deep($meta));
                                 $rvs = c_ws_plugin__s2member_utils_strings::trim_deep($rvs);
                                 foreach ($_p as $_key => $_value) {
                                     // Scan ``$_p`` vars; adding `custom_reg_field` keys.
                                     if (preg_match("/^ws_plugin__s2member_user_new_/", $_key)) {
                                         // Look for keys.
                                         if ($_key = str_replace("_user_new_", "_custom_reg_field_", $_key)) {
                                             $_p[$_key] = $_value;
                                         }
                                     }
                                 }
                                 // Add each of these key conversions.
                                 unset($_key, $_value);
                                 if (!is_admin() && (isset($_p["ws_plugin__s2member_custom_reg_field_s2member_subscr_gateway"]) || isset($_p["ws_plugin__s2member_custom_reg_field_s2member_subscr_id"]) || isset($_p["ws_plugin__s2member_custom_reg_field_s2member_custom"]) || isset($_p["ws_plugin__s2member_custom_reg_field_s2member_ccaps"]) || isset($_p["ws_plugin__s2member_custom_reg_field_s2member_auto_eot_time"]) || isset($_p["ws_plugin__s2member_custom_reg_field_s2member_notes"]))) {
                                     exit(_x("s2Member security violation. You attempted to POST administrative variables that will NOT be trusted in a NON-administrative zone!", "s2member-front", "s2member"));
                                 }
                                 $_pmr = array_merge($_p, $meta, $rvs);
                                 // Merge all of these arrays together now, in this specific order.
                                 unset($_p, $meta, $rvs);
                                 // These variables can all be unset now; we have them all in the ``$_pmr`` array.
                                 $custom_reg_display_name = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"];
                                 // Can be configured by the site owner.
                                 if (!is_admin() && (!c_ws_plugin__s2member_utils_conds::pro_is_installed() || !c_ws_plugin__s2member_pro_remote_ops::is_remote_op("create_user")) && ($reg_cookies = c_ws_plugin__s2member_register_access::reg_cookies_ok()) && extract($reg_cookies)) {
                                     /* This routine could be processed through `/wp-login.php?action=register`, `/wp-activate.php`, or `/activate` via BuddyPress`.
                                     			This may also be processed through a standard BuddyPress installation, or another plugin calling `user_register`.
                                     			If processed through `/wp-activate.php`, it could've originated inside the admin — via `/user-new.php`. */
                                     $processed = "yes";
                                     // Mark this as yes.
                                     $current_role = c_ws_plugin__s2member_user_access::user_access_role($user);
                                     @(list($level, $ccaps, $eotper) = preg_split("/\\:/", $item_number, 3));
                                     $role = "s2member_level" . $level;
                                     // Membership Level.
                                     $email = $user->user_email;
                                     $login = $user->user_login;
                                     $ip = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_registration_ip"];
                                     $ip = !$ip ? $_SERVER["REMOTE_ADDR"] : $ip;
                                     // Else use environment variable.
                                     $cv = preg_split("/\\|/", $custom);
                                     if (!($auto_eot_time = "") && $eotper) {
                                         // If a specific EOT Period is included.
                                         $auto_eot_time = c_ws_plugin__s2member_utils_time::auto_eot_time("", "", "", $eotper);
                                     }
                                     $notes = (string) @$_pmr["ws_plugin__s2member_custom_reg_field_s2member_notes"];
                                     $opt_in = !$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] ? true : false;
                                     $opt_in = !$opt_in && !empty($_pmr["ws_plugin__s2member_custom_reg_field_opt_in"]) ? true : $opt_in;
                                     if (!($fname = $user->first_name)) {
                                         if (!empty($_pmr["ws_plugin__s2member_custom_reg_field_first_name"])) {
                                             $fname = (string) $_pmr["ws_plugin__s2member_custom_reg_field_first_name"];
//.........这里部分代码省略.........
开发者ID:novichkovv,项目名称:candoweightloss,代码行数:101,代码来源:registrations.inc.php

示例8: add_admin_options

 /**
  * Adds option menus / sub-menus.
  *
  * @package s2Member\Menu_Pages
  * @since 3.5
  *
  * @attaches-to ``add_action('admin_menu');``
  */
 public static function add_admin_options()
 {
     do_action('ws_plugin__s2member_before_add_admin_options', get_defined_vars());
     add_filter('plugin_action_links', 'c_ws_plugin__s2member_menu_pages::_add_settings_link', 10, 2);
     if (apply_filters('ws_plugin__s2member_during_add_admin_options_create_menu_items', TRUE, get_defined_vars())) {
         if (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site() || apply_filters('ws_plugin__s2member_during_add_admin_options_clear_right_side', FALSE, get_defined_vars())) {
             $GLOBALS['WS_PLUGIN__']['s2member']['c']['menu_pages'] = array();
         }
         // Clear right side.
         $menu = apply_filters('ws_plugin__s2member_during_add_admin_options_menu_slug', 'ws-plugin--s2member-start', get_defined_vars());
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_menu_page', TRUE, get_defined_vars())) {
             add_menu_page(c_ws_plugin__s2member_utils_conds::pro_is_installed() ? 's2Member (Pro)' : 's2Member', c_ws_plugin__s2member_utils_conds::pro_is_installed() ? 's2Member (Pro)' : 's2Member', 'create_users', $menu, 'c_ws_plugin__s2member_menu_pages::start_page', $GLOBALS['WS_PLUGIN__']['s2member']['c']['dir_url'] . '/images/brand-favicon.png');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_start_page', TRUE, get_defined_vars())) {
             add_submenu_page($menu, 's2Member Quick-Start Guide', 'Quick-Start Guide', 'create_users', 'ws-plugin--s2member-start', 'c_ws_plugin__s2member_menu_pages::start_page');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_divider_1', TRUE, get_defined_vars())) {
             add_submenu_page($menu, '', '<span style="display:block; margin:1px 0 1px -5px; padding:0; height:1px; line-height:1px; background:#CCCCCC;"></span>', 'create_users', '#');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_mms_ops_page', !is_multisite() || is_main_site(), get_defined_vars())) {
             add_submenu_page($menu, 's2Member Multisite Configuration', 'Multisite (Config)', 'create_users', 'ws-plugin--s2member-mms-ops', 'c_ws_plugin__s2member_menu_pages::mms_ops_page');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_gen_ops_page', TRUE, get_defined_vars())) {
             add_submenu_page($menu, 's2Member General Options', 'General Options', 'create_users', 'ws-plugin--s2member-gen-ops', 'c_ws_plugin__s2member_menu_pages::gen_ops_page');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_res_ops_page', TRUE, get_defined_vars())) {
             add_submenu_page($menu, 's2Member Restriction Options', 'Restriction Options', 'create_users', 'ws-plugin--s2member-res-ops', 'c_ws_plugin__s2member_menu_pages::res_ops_page');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_down_ops_page', !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
             add_submenu_page($menu, 's2Member Download Options', 'Download Options', 'create_users', 'ws-plugin--s2member-down-ops', 'c_ws_plugin__s2member_menu_pages::down_ops_page');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_divider_2', TRUE, get_defined_vars())) {
             add_submenu_page($menu, '', '<span style="display:block; margin:1px 0 1px -5px; padding:0; height:1px; line-height:1px; background:#CCCCCC;"></span>', 'create_users', '#');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_paypal_ops_page', TRUE, get_defined_vars())) {
             add_submenu_page($menu, 's2Member PayPal Options', 'PayPal Options', 'create_users', 'ws-plugin--s2member-paypal-ops', 'c_ws_plugin__s2member_menu_pages::paypal_ops_page');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_paypal_buttons_page', TRUE, get_defined_vars())) {
             add_submenu_page($menu, 's2Member PayPal Buttons', 'PayPal Buttons', 'create_users', 'ws-plugin--s2member-paypal-buttons', 'c_ws_plugin__s2member_menu_pages::paypal_buttons_page');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_divider_3', TRUE, get_defined_vars())) {
             add_submenu_page($menu, '', '<span style="display:block; margin:1px 0 1px -5px; padding:0; height:1px; line-height:1px; background:#CCCCCC;"></span>', 'create_users', '#');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_trk_ops_page', TRUE, get_defined_vars())) {
             add_submenu_page($menu, 's2Member API / Tracking', 'API / Tracking', 'create_users', 'ws-plugin--s2member-trk-ops', 'c_ws_plugin__s2member_menu_pages::trk_ops_page');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_els_ops_page', TRUE, get_defined_vars())) {
             add_submenu_page($menu, 's2Member API / List Servers', 'API / List Servers', 'create_users', 'ws-plugin--s2member-els-ops', 'c_ws_plugin__s2member_menu_pages::els_ops_page');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_api_ops_page', TRUE, get_defined_vars())) {
             add_submenu_page($menu, 's2Member API / Notifications', 'API / Notifications', 'create_users', 'ws-plugin--s2member-api-ops', 'c_ws_plugin__s2member_menu_pages::api_ops_page');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_scripting_page', TRUE, get_defined_vars())) {
             add_submenu_page($menu, 's2Member API / Scripting', 'API / Scripting', 'create_users', 'ws-plugin--s2member-scripting', 'c_ws_plugin__s2member_menu_pages::scripting_page');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_divider_4', TRUE, get_defined_vars())) {
             add_submenu_page($menu, '', '<span style="display:block; margin:1px 0 1px -5px; padding:0; height:1px; line-height:1px; background:#CCCCCC;"></span>', 'create_users', '#');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_integrations_page', !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
             add_submenu_page($menu, 's2Member / Other Integrations', 'Other Integrations', 'create_users', 'ws-plugin--s2member-integrations', 'c_ws_plugin__s2member_menu_pages::integrations_page');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_divider_5', TRUE, get_defined_vars())) {
             add_submenu_page($menu, '', '<span style="display:block; margin:1px 0 1px -5px; padding:0; height:1px; line-height:1px; background:#CCCCCC;"></span>', 'create_users', '#');
         }
         if (apply_filters('ws_plugin__s2member_during_add_admin_options_add_logs_page', !is_multisite() || !c_ws_plugin__s2member_utils_conds::is_multisite_farm() || is_main_site(), get_defined_vars())) {
             add_submenu_page($menu, 's2Member Logs', 'Log Files (Debug)', 'create_users', 'ws-plugin--s2member-logs', 'c_ws_plugin__s2member_menu_pages::logs_page');
         }
         do_action('ws_plugin__s2member_during_add_admin_options_additional_pages', get_defined_vars());
     }
     do_action('ws_plugin__s2member_after_add_admin_options', get_defined_vars());
 }
开发者ID:adnandot,项目名称:intenseburn,代码行数:79,代码来源:menu-pages.inc.php

示例9: cp

 /**
  * s2Member's PayPal IPN handler (inner processing routine).
  *
  * @package s2Member\PayPal
  * @since 110720
  *
  * @param array $vars Required. An array of defined variables passed by {@link s2Member\PayPal\c_ws_plugin__s2member_paypal_notify_in::paypal_notify()}.
  *
  * @return array|bool The original ``$paypal`` array passed in (extracted) from ``$vars``, or false when conditions do NOT apply.
  */
 public static function cp($vars = array())
 {
     extract($vars, EXTR_OVERWRITE | EXTR_REFS);
     // Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``.
     if (!empty($paypal['txn_type']) && preg_match('/^(web_accept|subscr_signup)$/i', $paypal['txn_type']) && (!empty($paypal['item_number']) && preg_match($GLOBALS['WS_PLUGIN__']['s2member']['c']['membership_item_number_w_level_regex'], $paypal['item_number'])) && (!empty($paypal['subscr_id']) || !empty($paypal['txn_id']) && ($paypal['subscr_id'] = $paypal['txn_id'])) && (empty($paypal['payment_status']) || empty($payment_status_issues) || !preg_match($payment_status_issues, $paypal['payment_status'])) && (!empty($paypal['subscr_baid']) || ($paypal['subscr_baid'] = $paypal['subscr_id'])) && (!empty($paypal['subscr_cid']) || ($paypal['subscr_cid'] = $paypal['subscr_id'])) && !empty($paypal['payer_email'])) {
         foreach (array_keys(get_defined_vars()) as $__v) {
             $__refs[$__v] =& ${$__v};
         }
         do_action('ws_plugin__s2member_during_paypal_notify_before_subscr_signup', get_defined_vars());
         unset($__refs, $__v);
         if (!get_transient($transient_ipn = 's2m_ipn_' . md5('s2member_transient_' . $_paypal_s)) && set_transient($transient_ipn, time(), 31556926 * 10)) {
             $processing = $modifying = $during = FALSE;
             // Initialize these flags.
             $paypal['s2member_log'][] = 's2Member `txn_type` identified as ( `web_accept|subscr_signup` ).';
             @(list($paypal['level'], $paypal['ccaps'], $paypal['eotper']) = preg_split('/\\:/', $paypal['item_number'], 3));
             $paypal['ip'] = preg_match('/ip address/i', $paypal['option_name2']) && $paypal['option_selection2'] ? $paypal['option_selection2'] : '';
             $paypal['ip'] = !$paypal['ip'] && preg_match('/^[a-z0-9]+~[0-9\\.]+$/i', $paypal['invoice']) ? preg_replace('/^[a-z0-9]+~/i', '', $paypal['invoice']) : $paypal['ip'];
             $paypal['period1'] = isset($paypal['period1']) && preg_match('/^[1-9]/', $paypal['period1']) ? $paypal['period1'] : '0 D';
             $paypal['mc_amount1'] = isset($paypal['mc_amount1']) && $paypal['mc_amount1'] > 0 ? $paypal['mc_amount1'] : '0.00';
             if (preg_match('/^web_accept$/i', $paypal['txn_type'])) {
                 $paypal['period3'] = $paypal['eotper'] ? $paypal['eotper'] : '1 L';
                 // 1 lifetime.
                 $paypal['mc_amount3'] = $paypal['mc_gross'];
                 // The 'Buy Now' amount is the full gross.
             }
             $paypal['initial_term'] = preg_match('/^[1-9]/', $paypal['period1']) ? $paypal['period1'] : '0 D';
             $paypal['initial'] = isset($paypal['mc_amount1'][0]) && preg_match('/^[1-9]/', $paypal['period1']) ? $paypal['mc_amount1'] : $paypal['mc_amount3'];
             $paypal['regular'] = $paypal['mc_amount3'];
             // This is the regular payment amount that is charged to the customer. always required by PayPal.
             $paypal['regular_term'] = $paypal['period3'];
             // This is just set to keep a standard; this way both initial_term & regular_term are available.
             $paypal['recurring'] = !empty($paypal['recurring']) ? $paypal['mc_amount3'] : '0';
             // If non-recurring, this should be zero, otherwise regular.
             $paypal['currency'] = strtoupper($paypal['mc_currency']);
             // Normalize input currency.
             $paypal['currency_symbol'] = c_ws_plugin__s2member_utils_cur::symbol($paypal['currency']);
             if (!empty($coupon['coupon_code']) && c_ws_plugin__s2member_utils_conds::pro_is_installed()) {
                 $coupon_class = new c_ws_plugin__s2member_pro_coupons();
                 $coupon_class->update_uses($coupon['coupon_code']);
             }
             $ipn_signup_vars = $paypal;
             // Create array of IPN signup vars w/o s2member_log.
             unset($ipn_signup_vars['s2member_log']);
             /*
             New Subscription with advanced update vars (option_name1, option_selection1)? These variables are used in Subscr. Modifications.
             */
             if (preg_match('/(referenc|associat|updat|upgrad)/i', $paypal['option_name1']) && $paypal['option_selection1']) {
                 foreach (array_keys(get_defined_vars()) as $__v) {
                     $__refs[$__v] =& ${$__v};
                 }
                 do_action('ws_plugin__s2member_during_paypal_notify_before_subscr_signup_w_update_vars', get_defined_vars());
                 unset($__refs, $__v);
                 $paypal['s2member_log'][] = 's2Member `txn_type` identified as ( `web_accept|subscr_signup` ) w/ update vars.';
                 if (($user_id = c_ws_plugin__s2member_utils_users::get_user_id_with($paypal['subscr_id'], $paypal['option_selection1'])) && is_object($user = new WP_User($user_id)) && $user->ID) {
                     if (!$user->has_cap('administrator')) {
                         $processing = $modifying = $during = TRUE;
                         // Yes, we ARE processing this.
                         foreach (array_keys(get_defined_vars()) as $__v) {
                             $__refs[$__v] =& ${$__v};
                         }
                         do_action('ws_plugin__s2member_during_paypal_notify_during_before_subscr_signup_w_update_vars', get_defined_vars());
                         do_action('ws_plugin__s2member_during_collective_mods', $user_id, get_defined_vars(), 'ipn-upgrade-downgrade', 'modification', 's2member_level' . $paypal['level']);
                         unset($__refs, $__v);
                         $fields = get_user_option('s2member_custom_fields', $user_id);
                         $user_reg_ip = get_user_option('s2member_registration_ip', $user_id);
                         $user_reg_ip = $paypal['ip'] = $user_reg_ip ? $user_reg_ip : $paypal['ip'];
                         if (is_multisite() && !is_user_member_of_blog($user_id)) {
                             add_existing_user_to_blog(array('user_id' => $user_id, 'role' => 's2member_level' . $paypal['level']));
                             $user = new WP_User($user_id);
                         }
                         $current_role = c_ws_plugin__s2member_user_access::user_access_role($user);
                         if ($current_role !== 's2member_level' . $paypal['level']) {
                             $user->set_role('s2member_level' . $paypal['level']);
                         }
                         if ($paypal['ccaps'] && preg_match('/^-all/', str_replace('+', '', $paypal['ccaps']))) {
                             foreach ($user->allcaps as $cap => $cap_enabled) {
                                 if (preg_match('/^access_s2member_ccap_/', $cap)) {
                                     $user->remove_cap($ccap = $cap);
                                 }
                             }
                         }
                         if ($paypal['ccaps'] && preg_replace('/^-all[' . "\r\n\t" . '\\s;,]*/', '', str_replace('+', '', $paypal['ccaps']))) {
                             foreach (preg_split('/[' . "\r\n\t" . '\\s;,]+/', preg_replace('/^-all[' . "\r\n\t" . '\\s;,]*/', '', str_replace('+', '', $paypal['ccaps']))) as $ccap) {
                                 if (strlen($ccap = trim(strtolower(preg_replace('/[^a-z_0-9]/i', '', $ccap))))) {
                                     $user->add_cap('access_s2member_ccap_' . $ccap);
                                 }
                             }
                         }
                         update_user_option($user_id, 's2member_subscr_gateway', $paypal['subscr_gateway']);
                         update_user_option($user_id, 's2member_subscr_id', $paypal['subscr_id']);
//.........这里部分代码省略.........
开发者ID:adnandot,项目名称:intenseburn,代码行数:101,代码来源:paypal-notify-in-subscr-or-wa-w-level.inc.php

示例10: __construct


//.........这里部分代码省略.........
         echo '<p><strong>Regarding registration...</strong> Custom Fields do NOT appear during repeat registration and/or checkout attempts (e.g. they do NOT appear for any user that is currently logged into the site). Please make sure that you test registration and/or checkout forms while NOT logged in (e.g. please test as a first-time customer). Existing users/members/customers may update Custom Fields by editing their Profile.</p>' . "\n";
         do_action("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_custom_reg_fields", get_defined_vars());
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label>' . "\n";
         echo 'Custom Registration/Profile Fields:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="hidden" name="ws_plugin__s2member_custom_reg_fields" id="ws-plugin--s2member-custom-reg-fields" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"]) . '" />' . "\n";
         echo '<div id="ws-plugin--s2member-custom-reg-field-configuration"></div>' . "\n";
         // This is filled by JavaScript routines.
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-custom-reg-names">' . "\n";
         echo 'Collect First/Last Names during Registration?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_custom_reg_names" id="ws-plugin--s2member-custom-reg-names">' . "\n";
         echo '<option value="1"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"] ? ' selected="selected"' : '') . '>Yes (always collect First/Last Names during registration)</option>' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] ? ' selected="selected"' : '') . '>No (do NOT collect First/Last Names during registration)</option>' . "\n";
         echo '</select><br />' . "\n";
         echo 'Recommended setting (<code>Yes</code>). It\'s usually a good idea to leave this on.' . "\n";
         echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<br /><em>* Has NO affect on BuddyPress registration form (BuddyPress always collects a full <code>Name</code> field).</em>' . "\n" : '';
         echo c_ws_plugin__s2member_utils_conds::pro_is_installed() ? '<br /><em>* s2Member Pro (Checkout) Forms always require a First/Last Name for billing.</em>' . "\n" : '';
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-custom-reg-display-name">' . "\n";
         echo 'Set "Display Name" during Registration?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_custom_reg_display_name" id="ws-plugin--s2member-custom-reg-display-name">' . "\n";
         echo '<option value="full"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"] === "full" ? ' selected="selected"' : '') . '>Yes (set Display Name to User\'s Full Name)</option>' . "\n";
         echo '<option value="first"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"] === "first" ? ' selected="selected"' : '') . '>Yes (set Display Name to User\'s First Name)</option>' . "\n";
         echo '<option value="last"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"] === "last" ? ' selected="selected"' : '') . '>Yes (set Display Name to User\'s Last Name)</option>' . "\n";
         echo '<option value="login"' . ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"] === "login" ? ' selected="selected"' : '') . '>Yes (set Display Name to User\'s Username)</option>' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"] ? ' selected="selected"' : '') . '>No (leave Display Name at default WordPress value)</option>' . "\n";
         echo '</select>' . "\n";
         echo c_ws_plugin__s2member_utils_conds::bp_is_installed() ? '<br /><em>* Has NO affect on BuddyPress registration form (BuddyPress always uses its full <code>Name</code> field).</em>' . "\n" : '';
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-custom-reg-password">' . "\n";
         echo 'Allow Custom Passwords during Registration?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<select name="ws_plugin__s2member_custom_reg_password" id="ws-plugin--s2member-custom-reg-password"' . (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && is_main_site() && !c_ws_plugin__s2member_utils_conds::pro_is_installed() ? ' disabled="disabled"' : '') . '>' . "\n";
         echo '<option value="0"' . (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"] ? ' selected="selected"' : '') . '>No (send auto-generated passwords via email; after registration)</option>' . "\n";
开发者ID:novichkovv,项目名称:candoweightloss,代码行数:67,代码来源:gen-ops.inc.php

示例11: __construct

 public function __construct()
 {
     echo '<div class="wrap ws-menu-page">' . "\n";
     echo '<div class="ws-menu-page-toolbox">' . "\n";
     c_ws_plugin__s2member_menu_pages_tb::display();
     echo '</div>' . "\n";
     echo '<h2>Getting Help w/ s2Member®</h2>' . "\n";
     echo '<table class="ws-menu-page-table">' . "\n";
     echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
     echo '<tr class="ws-menu-page-table-tr">' . "\n";
     echo '<td class="ws-menu-page-table-l">' . "\n";
     do_action("ws_plugin__s2member_during_help_page_before_left_sections", get_defined_vars());
     do_action("ws_plugin__s2member_during_help_page_during_left_sections_before_help", get_defined_vars());
     echo '<div class="ws-menu-page-group" title="Getting Help w/ s2Member" default-state="open">' . "\n";
     echo '<div class="ws-menu-page-section ws-plugin--s2member-help">' . "\n";
     echo '<p>s2Member is pretty easy to setup and install initially. Most of the official documentation is right here in your Dashboard (i.e., there is a lot of inline documentation built into the software). That being said, it can take some time to master everything there is to know about s2Member\'s advanced features. If you need assistance with s2Member, please search the <a href="http://s2member.com/kb/" target="_blank" rel="external">s2Member Knowledge Base</a>, <a href="http://s2member.com/videos/" target="_blank" rel="external">Video Tutorials</a>, <a href="http://s2member.com/forums/" target="_blank" rel="external">Forums</a> and <a href="http://s2member.com/r/codex/" target="_blank" rel="external">Codex</a>. If you are planning to do something creative with s2Member, you might want to <a href="http://jobs.wordpress.net" target="_blank" rel="external">hire a freelance developer</a> to assist you.</p>' . "\n";
     echo '<p><strong>See also:</strong> <a href="http://s2member.com/r/common-troubleshooting-tips/" target="_blank" rel="external">s2Member Troubleshooting Guide</a> (please read this first if you\'re having trouble).</p>' . "\n";
     echo '<div class="ws-menu-page-hr"></div>' . "\n";
     echo '<h3 style="margin-bottom:0;">Testing Server Compatibility</h3>' . "\n";
     echo '<p>Please download the <a href="http://s2member.com/r/server-scanner-info/">s2Member Server Scanner</a>. Unzip, upload via FTP; then open in a browser for a full report.</p>' . "\n";
     echo '<div class="ws-menu-page-hr"></div>' . "\n";
     echo '<h3 style="margin-bottom:0;">Troubleshooting Payment Gateway Integrations</h3>' . "\n";
     echo '<p>Please use s2Member\'s <a href="' . esc_attr(admin_url("/admin.php?page=ws-plugin--s2member-logs")) . '">Log Viewer</a>. Log files can be very helpful.</p>' . "\n";
     echo '<div class="ws-menu-page-hr"></div>' . "\n";
     echo '<h3 style="margin-bottom:0;">Search s2Member KB Articles<em>!</em></h3>' . "\n";
     echo '<form method="get" action="http://s2member.com/kb/" target="_blank" onsubmit="if(this.q.value === \'enter search terms...\') this.q.value = \'\';" autocomplete="off">' . "\n";
     echo '<p><input type="text" name="kb_q" value="enter search terms..." style="width:60%;" onfocus="if(this.value === \'enter search terms...\') this.value = \'\';" onblur="if(this.value === \'\') this.value = \'enter search terms...\';" /> <input type="submit" value="Search" style="font-size:120%; font-weight:normal;" /></p>' . "\n";
     echo '</form>' . "\n";
     do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_help", get_defined_vars());
     echo '</div>' . "\n";
     echo '</div>' . "\n";
     do_action("ws_plugin__s2member_during_help_page_during_left_sections_after_help", get_defined_vars());
     do_action("ws_plugin__s2member_during_help_page_during_left_sections_before_support", get_defined_vars());
     echo '<div class="ws-menu-page-group" title="s2Member Tech. Support (for Pro Customers)" default-state="open">' . "\n";
     echo '<div class="ws-menu-page-section ws-plugin--s2member-support">' . "\n";
     echo '<p style="max-width:900px;">Support for s2Member® is provided by WebSharks, Inc. Our customer support representatives are available Monday through Friday, excluding all major holidays. Or, you can discuss problems/solutions with others in our <a href="https://wordpress.org/support/plugin/s2member" target="_blank" rel="external">public community forum</a>.</p>' . "\n";
     echo '<ul>' . "\n";
     echo '<li>For pre-sale questions please see: <a href="http://s2member.com/kb/kb-tag/pre-sale-faqs/" target="_blank" rel="external">Pre-Sale FAQs</a>.</li>' . "\n";
     echo '<li>For installation instructions, please see: <a href="http://s2member.com/installation/" target="_blank" rel="external">Installing/Updating s2Member & s2Member Pro</a>.</li>' . "\n";
     echo '<li>For troubleshooting (and documentation) please <a href="http://s2member.com/kb/" target="_blank" rel="external">search our Knowledge Base</a>.</li>' . "\n";
     echo '<li>Paying customers in need of assistance may <a href="http://s2member.com/r/new-trouble-ticket/" target="_blank" rel="external">submit a trouble ticket</a>.</li>' . "\n";
     echo '<li>If you have other questions, please <a href="http://s2member.com/r/new-pre-sale-inquiry/" target="_blank" rel="external">contact our sales dept</a>.</li>' . "\n";
     echo '</ul>' . "\n";
     do_action("ws_plugin__s2member_during_start_page_during_left_sections_during_support", get_defined_vars());
     echo '</div>' . "\n";
     echo '</div>' . "\n";
     do_action("ws_plugin__s2member_during_help_page_during_left_sections_after_support", get_defined_vars());
     if (apply_filters("ws_plugin__s2member_during_help_page_during_left_sections_display_pro", !c_ws_plugin__s2member_utils_conds::pro_is_installed(), get_defined_vars())) {
         do_action("ws_plugin__s2member_during_help_page_during_left_sections_before_pro", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Upgrading to s2Member Pro<em>!</em>" default-state="open">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-pro">' . "\n";
         echo '<p>Among many other features/enhancements, <a href="http://s2member.com/" target="_blank" rel="external">s2Member Pro</a> comes pre-integrated with additional payment gateways that work with s2Member Pro-Forms (a powerful s2Member Pro feature). For instance, Stripe (most popular; also supports Bitcoin), PayPal Payments Pro, and Authorize.Net. Each of these payment gateways allow you to accept most major credit cards on-site; i.e., customers never leave your site! s2Member Pro-Forms also support PayPal Express Checkout (if you integrate with PayPal Pro); for customers who actually prefer to pay with PayPal.</p>' . "\n";
         echo '<p><strong>Learn more here:</strong> <a href="http://s2member.com/features/" target="_blank" rel="external">s2Member Pro Features</a></p>' . "\n";
         do_action("ws_plugin__s2member_during_help_page_during_left_sections_during_pro", get_defined_vars());
         echo '</div>' . "\n";
         echo '</div>' . "\n";
         do_action("ws_plugin__s2member_during_start_page_during_left_sections_after_pro", get_defined_vars());
     }
     do_action("ws_plugin__s2member_during_help_page_after_left_sections", get_defined_vars());
     echo '</td>' . "\n";
     echo '<td class="ws-menu-page-table-r">' . "\n";
     c_ws_plugin__s2member_menu_pages_rs::display();
     echo '</td>' . "\n";
     echo '</tr>' . "\n";
     echo '</tbody>' . "\n";
     echo '</table>' . "\n";
     echo '</div>' . "\n";
 }
开发者ID:codeforest,项目名称:s2member,代码行数:68,代码来源:help.inc.php

示例12: auto_update_filter

 /**
  * Disallow automatic updates of s2Member w/ Pro is installed.
  *
  * @package s2Member\Installation
  * @since 150717
  *
  * @attaches-to `auto_update_plugin` filter.
  */
 public static function auto_update_filter($update = NULL, $item = NULL)
 {
     if (is_object($item) && !empty($item->slug) && $item->slug === 's2member') {
         if (c_ws_plugin__s2member_utils_conds::pro_is_installed()) {
             $update = FALSE;
         }
     }
     // Disallow.
     return $update;
     // Filter through.
 }
开发者ID:adnandot,项目名称:intenseburn,代码行数:19,代码来源:installation.inc.php

示例13: sc_get_stream

 /**
  * Handles the Shortcode for: `[s2Stream /]`.
  *
  * @package s2Member\s2File
  * @since 130119
  *
  * @attaches-to ``add_shortcode('s2Stream');``
  *
  * @param array  $attr An array of Attributes.
  * @param string $content Content inside the Shortcode.
  * @param string $shortcode The actual Shortcode name itself.
  *
  * @return string HTML markup that produces an audio/video stream for a specific player.
  */
 public static function sc_get_stream($attr = array(), $content = '', $shortcode = '')
 {
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action('ws_plugin__s2member_before_sc_get_stream', get_defined_vars());
     unset($__refs, $__v);
     // Housekeeping.
     $attr = c_ws_plugin__s2member_utils_strings::trim_qts_deep((array) $attr);
     $attr = shortcode_atts(array('download' => '', 'file_download' => '', 'download_key' => '', 'stream' => 'yes', 'inline' => 'yes', 'storage' => '', 'remote' => '', 'ssl' => '', 'rewrite' => 'yes', 'rewrite_base' => '', 'skip_confirmation' => '', 'url_to_storage_source' => 'yes', 'count_against_user' => 'yes', 'check_user' => 'yes', 'player' => 'jwplayer-v6-rtmp', 'player_id' => 's2-stream-' . md5(uniqid('', TRUE)), 'player_path' => '/jwplayer/jwplayer.js', 'player_key' => '', 'player_title' => '', 'player_image' => '', 'player_mediaid' => '', 'player_description' => '', 'player_captions' => '', 'player_resolutions' => '', 'player_controls' => 'yes', 'player_skin' => '', 'player_stretching' => 'uniform', 'player_width' => '480', 'player_height' => '270', 'player_aspectratio' => '', 'player_autostart' => 'no', 'player_fallback' => 'yes', 'player_mute' => 'no', 'player_primary' => $attr['player'] === 'jw-player-v6' ? 'html5' : 'flash', 'player_repeat' => 'no', 'player_startparam' => '', 'player_option_blocks' => ''), $attr);
     $attr['download'] = !empty($attr['file_download']) ? $attr['file_download'] : $attr['download'];
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action('ws_plugin__s2member_before_sc_get_stream_after_shortcode_atts', get_defined_vars());
     unset($__refs, $__v);
     // Housekeeping.
     foreach ($attr as $key => $value) {
         // Now we need to go through and a `file_` prefix  to certain Attribute keys, for compatibility.
         if (strlen($value) && in_array($key, array('download', 'download_key', 'stream', 'inline', 'storage', 'remote', 'ssl', 'rewrite', 'rewrite_base'))) {
             $config['file_' . $key] = $value;
         } else {
             if (strlen($value) && !in_array($key, array('file_download', 'player')) && strpos($key, 'player_') !== 0) {
                 $config[$key] = $value;
             }
         }
     }
     unset($key, $value);
     // Ditch these now. We don't want these bleeding into Hooks/Filters anyway.
     if (!empty($config) && isset($config['file_download'])) {
         if ($attr['player_resolutions'] && c_ws_plugin__s2member_utils_conds::pro_is_installed()) {
             $file_download_extension = strtolower(ltrim((string) strrchr(basename($config['file_download']), '.'), '.'));
             $file_download_resolution_wo_extension = substr($config['file_download'], 0, -(strlen($file_download_extension) + 1));
             $file_download_wo_resolution_extension = preg_replace('/\\-r[0-9]+([^.]*)$/i', '', $file_download_resolution_wo_extension);
             // e.g., `r720p-HD` is removed here.
             $file_download_resolutions = array();
             // Initialize the array of resolutions.
             foreach (preg_split('/[,;\\s]+/', $attr['player_resolutions'], NULL, PREG_SPLIT_NO_EMPTY) as $_player_resolution) {
                 $_player_resolution = ltrim($_player_resolution, 'Rr');
                 // Remove R|r prefix.
                 $file_download_resolutions[$_player_resolution] = $file_download_wo_resolution_extension . '-r' . $_player_resolution . '.' . $file_download_extension;
             }
             unset($_player_resolution);
             // Housekeeping.
             $file_download_urls = array();
             // Initialize array of all file download urls.
             foreach ($file_download_resolutions as $_player_resolution => $_file_download_resolution) {
                 $_file_download_config = array_merge($config, array('file_download' => $_file_download_resolution));
                 if ($file_download_urls) {
                     // If this is a ANOTHER resolution, don't count it against the user.
                     $_file_download_config = array_merge($_file_download_config, array('check_user' => FALSE, 'count_against_user' => FALSE));
                 }
                 if (!($file_download_urls[str_replace(array('_', '-'), ' ', $_player_resolution)] = c_ws_plugin__s2member_files::create_file_download_url($_file_download_config, TRUE))) {
                     return apply_filters('ws_plugin__s2member_sc_get_stream', NULL, get_defined_vars());
                 }
                 // Failure.
             }
             unset($_player_resolution, $_file_download_resolution, $_file_download_config);
             // Housekeeping.
         } else {
             $file_download_urls = array(c_ws_plugin__s2member_files::create_file_download_url($config, TRUE));
         }
         // Default behavior.
         if ($file_download_urls && $attr['player'] && is_file($template = dirname(dirname(__FILE__)) . '/templates/players/' . $attr['player'] . '.php') && $attr['player_id'] && $attr['player_path']) {
             $template = is_file(TEMPLATEPATH . '/' . basename($template)) ? TEMPLATEPATH . '/' . basename($template) : $template;
             $template = is_file(get_stylesheet_directory() . '/' . basename($template)) ? get_stylesheet_directory() . '/' . basename($template) : $template;
             $template = is_file(WP_CONTENT_DIR . '/' . basename($template)) ? WP_CONTENT_DIR . '/' . basename($template) : $template;
             if (strpos($attr['player'], 'jwplayer-v6') === 0) {
                 $player = trim(c_ws_plugin__s2member_utilities::evl(file_get_contents($template)));
                 $_first_file_download_url = array();
                 // Holds the first one.
                 $_last_file_download_url = array();
                 // Holds the last one.
                 $_uses_rtmp_streamers = FALSE;
                 // Streamers use RTMP?
                 $_total_player_sources = count($file_download_urls);
                 // Total sources.
                 $_player_sources_counter = 1;
                 // Player sources counter; needed by the loop below.
                 $player_resolution_aspect_ratio_w = 16;
                 // 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']);
                 }
//.........这里部分代码省略.........
开发者ID:codeforest,项目名称:s2member,代码行数:101,代码来源:sc-files-in.inc.php

示例14: __construct

 public function __construct()
 {
     echo '<div class="wrap ws-menu-page">' . "\n";
     echo '<div class="ws-menu-page-toolbox">' . "\n";
     c_ws_plugin__s2member_menu_pages_tb::display();
     echo '</div>' . "\n";
     echo '<h2>API / Notifications</h2>' . "\n";
     echo '<table class="ws-menu-page-table">' . "\n";
     echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
     echo '<tr class="ws-menu-page-table-tr">' . "\n";
     echo '<td class="ws-menu-page-table-l">' . "\n";
     echo '<form method="post" name="ws_plugin__s2member_options_form" id="ws-plugin--s2member-options-form">' . "\n";
     echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")) . '" />' . "\n";
     echo '<input type="hidden" name="ws_plugin__s2member_configured" id="ws-plugin--s2member-configured" value="1" />' . "\n";
     do_action("ws_plugin__s2member_during_api_ops_page_before_left_sections", get_defined_vars());
     if (apply_filters("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_signup_notifications", true, get_defined_vars())) {
         do_action("ws_plugin__s2member_during_api_ops_page_during_left_sections_before_signup_notifications", get_defined_vars());
         echo '<div class="ws-menu-page-group" title="Signup Notifications">' . "\n";
         echo '<div class="ws-menu-page-section ws-plugin--s2member-signup-notifications-section">' . "\n";
         echo '<h3>Signup Notification URLs (optional)</h3>' . "\n";
         echo '<p>If you use affiliate software, or have back-office routines that need to be notified whenever a new Subscription is created, you\'ll want to read this section. This is marked `Signup`, because the URLs that you list below, will be notified each time a "new", "paying" Member signs up. Depending on your fee structure, this may include a payment that establishes their Subscription, or it may not. This Notification will only be triggered once for each Member. Signup Notifications are sent right after a "new", "paying" Member signs up successfully through your Payment Gateway, regardless of whether any money has actually been transacted. In other words, this Notification is triggered anytime a "new", "paying" Member signs up through your Payment Gateway, even if you provided them with something for free <em>(e.g. even if no money is being transacted)</em>.</p>' . "\n";
         echo '<p>This Notification will NOT be processed for Free Subscribers that register without going through your Payment Gateway at all (e.g. they simply register on-site; and there is no checkout whatsoever). This Notification will NOT be processed when an "existing" User/Member pays for a new Subscription <em>(see: Modification Notifications for that scenario)</em>.' . (is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site() ? '' : ' And, this Notification will NOT be processed on Buy Now transactions for Independent Custom Capabilities <em>(see: Payment Notifications for that scenario)</em>.') . '</p>' . "\n";
         echo '<p>Please note, this feature is not to be confused with the PayPal IPN service. PayPal IPN <em>(and other service integrations)</em> are already built into s2Member. They remain active at all times. These Signup Notifications are an added layer of functionality, and they are completely optional.</p>' . "\n";
         echo '<p><strong>See also:</strong> This KB article: <a href="http://www.s2member.com/kb/building-an-api-notification-handler/" target="_blank" rel="external">Building An API Notification Handler</a>.</p>' . "\n";
         do_action("ws_plugin__s2member_during_api_ops_page_during_left_sections_during_signup_notifications", get_defined_vars());
         echo '<table class="form-table">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th>' . "\n";
         echo '<label for="ws-plugin--s2member-signup-notification-urls">' . "\n";
         echo 'Signup Notification URLs:' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo 'You can input multiple Notification URLs by inserting one per line.<br />' . "\n";
         echo '<textarea name="ws_plugin__s2member_signup_notification_urls" id="ws-plugin--s2member-signup-notification-urls" rows="3" wrap="off">' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_notification_urls"]) . '</textarea><br />' . "\n";
         echo 'Signup Notifications take place silently behind-the-scene, using an HTTP connection.<br /><br />' . "\n";
         echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
         echo '<ul class="ws-menu-page-li-margins">' . "\n";
         echo '<li><code>%%subscr_id%%</code> = The Paid Subscription ID, which remains constant throughout any &amp; all future payments. [ <a href="#" onclick="alert(\'There is one exception. If you are selling Lifetime or Fixed-Term (non-recurring) access, using Buy Now functionality; the %%subscr_id%% is actually set to the Transaction ID for the purchase. Payment Gateways do not provide a specific Subscription ID for Buy Now purchases. Since Lifetime &amp; Fixed-Term Subscriptions are NOT recurring (i.e. there is only ONE payment), using the Transaction ID as the Subscription ID is a graceful way to deal with this minor conflict.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%subscr_baid%%</code> = Applicable only with PayPal Pro (Payflow Edition); and only for Express Checkout transactions that require a Billing Agreement. This is the Subscription\'s Billing Agreement ID, which remains constant throughout any &amp; all future payments. [ <a href="#" onclick="alert(\'Applicable only with PayPal Pro (Payflow Edition); and only for Express Checkout transactions that require a Billing Agreement. In all other cases, the %%subscr_baid%% is simply set to the %%subscr_id%% value; i.e. it is a duplicate of %%subscr_id%% in most cases.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%subscr_cid%%</code> = Applicable only with Stripe integration. This is the Customer\'s ID in Stripe, which remains constant throughout any &amp; all future payments. Each Stripe Customer has this Customer ID; and also a Subscription and/or Transaction ID [ <a href="#" onclick="alert(\'Applicable only when you integrate s2Member with Stripe. In all other cases, the %%subscr_cid%% is simply set to the %%subscr_id%% value; i.e. it is a duplicate of %%subscr_id%% when running anything other than Stripe.\\n\\nEach Stripe Customer has a Customer ID; and also a Subscription and/or Transaction ID. See %%subscr_id%% for further details.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%initial%%</code> = The Initial Fee charged during signup. If you offered a 100% Free Trial, this will be <code>0</code>. [ <a href="#" onclick="alert(\'This will always represent the amount of money the Customer spent, whenever they initially signed up, no matter what. Even if that amount is 0.\\n\\nIf a Customer signs up, under the terms of a 100% Free Trial Period, this will be 0. So be careful using %%initial%% when you offer a 100% Free Trial Period, because a $0.00 sale amount could cause havoc with affiliate programs.\\n\\nIf you\\\'re offering a 100% Free Trial Period, and you need to track sales through affiliate programs, you can either hard-code an amount; or use `Payment Notifications` instead.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%regular%%</code> = The Regular Amount of the Subscription. If you offer something 100% free, this will be <code>0</code>. [ <a href="#" onclick="alert(\'This is how much the Subscription costs after an Initial Period expires. If you did NOT offer an Initial Period at a different price, %%initial%% and %%regular%% will be equal to the same thing.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a recurring basis, or <code>0</code> if non-recurring. [ <a href="#" onclick="alert(\'If Recurring Payments have not been required, this will be equal to 0. That being said, %%regular%% &amp; %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the Regular Recurring Rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%full_name%%</code> = The Full Name (First &amp; Last) of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%user_ip%%</code> = The Customer\'s IP Address, detected during checkout via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
         echo '<li><code>%%item_number%%</code> = The Item Number (colon separated <code><em>level:custom_capabilities:fixed term</em></code>) for the Membership Subscription.</li>' . "\n";
         echo '<li><code>%%item_name%%</code> = The Item Name (as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number).</li>' . "\n";
         echo '<li><code>%%initial_term%%</code> = This is the term length of the Initial Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%initial_term%% = 1 D (this means 1 Day)\\n%%initial_term%% = 1 W (this means 1 Week)\\n%%initial_term%% = 1 M (this means 1 Month)\\n%%initial_term%% = 1 Y (this means 1 Year)\\n\\nThe Initial Period never recurs, so this only lasts for the term length specified, then it is over.\'); return false;">?</a> ]</li>' . "\n";
         echo '<li><code>%%regular_term%%</code> = This is the term length of the Regular Period. This will be a numeric value, followed by a space, then a single letter. [ <a href="#" onclick="alert(\'Here are some examples:\\n\\n%%regular_term%% = 1 D (this means 1 Day)\\n%%regular_term%% = 1 W (this means 1 Week)\\n%%regular_term%% = 1 M (this means 1 Month)\\n%%regular_term%% = 1 Y (this means 1 Year)\\n%%regular_term%% = 1 L (this means 1 Lifetime)\\n\\nThe Regular Term is usually recurring. So the Regular Term value represents the period (or duration) of each recurring period. If %%recurring%% = 0, then the Regular Term only applies once, because it is not recurring. So if it is not recurring, the value of %%regular_term%% simply represents how long their Membership privileges are going to last after the %%initial_term%% has expired, if there was an Initial Term. The value of this variable ( %%regular_term%% ) will never be empty, it will always be at least: 1 D, meaning 1 day. No exceptions.\'); return false;">?</a> ]</li>' . "\n";
         echo '</ul>' . "\n";
         if (c_ws_plugin__s2member_utils_conds::pro_is_installed()) {
             echo '<strong>Coupon Replacement Codes (applicable only w/ s2Member Pro Forms):</strong>' . "\n";
             echo '<ul class="ws-menu-page-li-margins">' . "\n";
             echo '<li><code>%%full_coupon_code%%</code> = A full Coupon Code — if one is accepted by your configuration of s2Member. This may indicate an Affiliate Coupon Code, which will include your Affiliate Suffix Chars too (e.g. the full Coupon Code).</li>' . "\n";
             echo '<li><code>%%coupon_code%%</code> = A Coupon Code — if one is accepted by your configuration of s2Member. This will NOT include any Affiliate Suffix Chars. This indicates the actual Coupon Code accepted by your configuration of s2Member (excluding any Affiliate ID).</li>' . "\n";
             echo '<li><code>%%coupon_affiliate_id%%</code> = This is the end of an Affiliate Coupon Code <em>(i.e. the referring affiliate\'s ID)</em>. This is only applicable if an Affiliate Coupon Code is accepted by your configuration of s2Member.</li>' . "\n";
             echo '</ul>' . "\n";
         }
         echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
         echo '<ul class="ws-menu-page-li-margins">' . "\n";
         echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
         echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
         echo '</ul>' . "\n";
         echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
         echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
         echo '<code>custom="' . esc_html($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '<div class="ws-menu-page-hr"></div>' . "\n";
         echo '<table class="form-table" style="margin-top:0;">' . "\n";
         echo '<tbody>' . "\n";
         echo '<tr>' . "\n";
         echo '<th style="padding-top:0;">' . "\n";
         echo '<label for="ws-plugin--s2member-signup-notification-recipients">' . "\n";
         echo 'Send An Email Transaction Log Of This Event?' . "\n";
         echo '</label>' . "\n";
         echo '</th>' . "\n";
         echo '</tr>' . "\n";
         echo '<tr>' . "\n";
         echo '<td>' . "\n";
         echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_signup_notification_recipients" id="ws-plugin--s2member-signup-notification-recipients" value="' . format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_notification_recipients"]) . '" /><br />' . "\n";
         echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
         echo '<code>"John" &lt;john@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         echo '</tbody>' . "\n";
         echo '</table>' . "\n";
         echo '</div>' . "\n";
         echo '</div>' . "\n";
     }
     if (apply_filters("ws_plugin__s2member_during_api_ops_page_during_left_sections_display_registration_notifications", true, get_defined_vars())) {
//.........这里部分代码省略.........
开发者ID:novichkovv,项目名称:candoweightloss,代码行数:101,代码来源:api-ops.inc.php

示例15: sc_if_conditionals

 /**
  * Handles the Shortcode for: `[s2If /]`.
  *
  * These Shortcodes are also safe to use on a Multisite Blog Farm.
  *
  * Is Multisite Networking enabled? Please keep the following in mind.
  * ``current_user_can()``, will ALWAYS return true for a Super Admin!
  * 	*(this can be confusing when testing conditionals)*.
  *
  * If you're running a Multisite Blog Farm, you can Filter this array:
  * 	`ws_plugin__s2member_sc_if_conditionals_blog_farm_safe`
  * 	``$blog_farm_safe``
  *
  * @package s2Member\s2If
  * @since 3.5
  *
  * @attaches-to ``add_shortcode("s2If")`` + _s2If, __s2If, ___s2If for nesting.
  *
  * @param array $attr An array of Attributes.
  * @param str $content Content inside the Shortcode.
  * @param str $shortcode The actual Shortcode name itself.
  * @return str The ``$content`` if true, else an empty string.
  *
  * @todo Add support for nested AND/OR conditionals inside the ONE Shortcode.
  * @todo Address possible security issue on sites with multiple editors, some of which should not have access to this feature.
  */
 public static function sc_if_conditionals($attr = FALSE, $content = FALSE, $shortcode = FALSE)
 {
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_before_sc_if_conditionals", get_defined_vars());
     unset($__refs, $__v);
     $blog_farm_safe = apply_filters("ws_plugin__s2member_sc_if_conditionals_blog_farm_safe", array("is_user_logged_in", "is_user_not_logged_in", "user_is", "user_is_not", "user_can", "user_cannot", "current_user_is", "current_user_is_not", "current_user_can", "current_user_cannot", "is_admin", "is_blog_admin", "is_user_admin", "is_network_admin", "is_404", "is_home", "is_front_page", "is_singular", "is_single", "is_page", "is_page_template", "is_attachment", "is_feed", "is_archive", "is_search", "is_category", "is_tax", "is_tag", "has_tag", "is_author", "is_date", "is_day", "is_month", "is_time", "is_year", "is_sticky", "is_paged", "is_preview", "is_comments_popup", "in_the_loop", "comments_open", "pings_open", "has_excerpt", "has_post_thumbnail"), get_defined_vars());
     $pro_is_installed = c_ws_plugin__s2member_utils_conds::pro_is_installed();
     // Has pro version?
     $sc_conds_allow_arbitrary_php = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sc_conds_allow_arbitrary_php"];
     if (!$pro_is_installed || is_multisite() && c_ws_plugin__s2member_utils_conds::is_multisite_farm() && !is_main_site()) {
         $sc_conds_allow_arbitrary_php = FALSE;
     }
     // Always disallow on child blogs of a blog farm.
     $attr = c_ws_plugin__s2member_utils_strings::trim_qts_deep((array) $attr);
     $content_if = $content_else = NULL;
     // Initialize.
     $shortcode_depth = strspn($shortcode, '_');
     // Based on a zero index.
     $else_tag = "[" . str_repeat("_", $shortcode_depth) . "else]";
     // e.g. [else], [_else], [__else]
     if (strpos($content, $else_tag) !== FALSE && $pro_is_installed) {
         list($content_if, $content_else) = explode($else_tag, $content, 2);
     }
     # Arbitrary PHP code via the `php` attribute...
     if ($sc_conds_allow_arbitrary_php && isset($attr["php"])) {
         if ($condition_succeeded = c_ws_plugin__s2member_sc_if_conds_in::evl($attr["php"])) {
             $condition_content = isset($content_if) ? $content_if : $content;
         } else {
             $condition_content = isset($content_else) ? $content_else : "";
         }
         if ($condition_content) {
             $condition_content = c_ws_plugin__s2member_utils_strings::trim_html($condition_content);
         }
         return do_shortcode(apply_filters("ws_plugin__s2member_sc_if_conditionals", $condition_content, get_defined_vars()));
     } else {
         if (isset($attr["php"])) {
             trigger_error("s2If syntax error. Simple Conditionals are not currently configured to allow arbitrary PHP code evaluation.", E_USER_ERROR);
             return "";
             // Return now; empty string in this case.
         }
     }
     # Default behavior otherwise...
     foreach ($attr as $attr_key => $attr_value) {
         // Detects and removes logical attributes.
         // It's NOT possible to mix logic. You MUST stick to one type of logic or another.
         // If both types of logic are needed, you MUST use two different Shortcodes.
         if (preg_match("/^(&&|&amp;&amp;|&#038;&#038;|AND|\\|\\||OR|[\\!\\=\\<\\>]+)\$/i", $attr_value)) {
             // Stick with AND/OR. Ampersands are corrupted by the Visual Editor.
             $logicals[] = strtolower($attr_value);
             // Place all logicals into an array here.
             unset($attr[$attr_key]);
             // ^ Detect logic here. We'll use the first key #0.
             if (preg_match("/^[\\!\\=\\<\\>]+\$/i", $attr_value)) {
                 trigger_error("s2If, invalid operator [ " . $attr_value . " ]. Simple Conditionals cannot process operators like ( == != <> ). Please use Advanced (PHP) Conditionals instead.", E_USER_ERROR);
                 return "";
                 // Return now; empty string in this case.
             }
         }
     }
     if (!empty($logicals) && is_array($logicals) && count(array_unique($logicals)) > 1) {
         trigger_error("s2If, AND/OR malformed conditional logic. It's NOT possible to mix logic using AND/OR combinations. You MUST stick to one type of logic or another. If both types of logic are needed, you MUST use two different Shortcode expressions. Or, use Advanced (PHP) Conditionals instead.", E_USER_ERROR);
         return "";
         // Return now; empty string in this case.
     }
     $conditional_logic = !empty($logicals) && is_array($logicals) && preg_match("/^(\\|\\||OR)\$/i", $logicals[0]) ? "OR" : "AND";
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_before_sc_if_conditionals_after_conditional_logic", get_defined_vars());
     unset($__refs, $__v);
     if ($conditional_logic === "AND") {
         foreach ($attr as $attr_value) {
//.........这里部分代码省略.........
开发者ID:donwea,项目名称:nhap.org,代码行数:101,代码来源:sc-if-conds-in.inc.php


注:本文中的c_ws_plugin__s2member_utils_conds::pro_is_installed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。