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


PHP c_ws_plugin__s2member_utils_strings::wrap_deep方法代码示例

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


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

示例1: auto_process_list_server_removals

 /**
  * Listens to Collective EOT/MOD Events processed internally by s2Member.
  *
  * This is only applicable when ``['custom_reg_auto_opt_outs']`` contains related Event(s).
  *
  * @package s2Member\List_Servers
  * @since 3.5
  *
  * @attaches-to ``add_action('ws_plugin__s2member_during_collective_mods');``
  * @attaches-to ``add_action('ws_plugin__s2member_during_collective_eots');``
  *
  * @param int|string $user_id Required. A WordPress User ID, numeric string or integer.
  * @param array      $vars Required. An array of defined variables passed by the calling Hook.
  * @param string     $event Required. A specific event that triggered this call from the Action Hook.
  * @param string     $event_spec Required. A specific event specification *(a broader classification)*.
  * @param string     $mod_new_role Required if ``$event_spec === 'modification'`` (but can be empty). Role the User is being modified to.
  * @param string     $mod_new_user Optional. If ``$event_spec === 'modification'``, the new User object with current details.
  * @param string     $mod_old_user Optional. If ``$event_spec === 'modification'``, the old/previous User obj with old details.
  */
 public static function auto_process_list_server_removals($user_id, $vars, $event, $event_spec, $mod_new_role = NULL, $mod_new_user = NULL, $mod_old_user = NULL)
 {
     global $current_site, $current_blog;
     // For Multisite support.
     static $auto_processed = array();
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action('ws_plugin__s2member_before_auto_process_list_server_removals', get_defined_vars());
     unset($__refs, $__v);
     $custom_reg_auto_op_outs = c_ws_plugin__s2member_utils_strings::wrap_deep($GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_auto_opt_outs'], '/^', '$/i');
     if (c_ws_plugin__s2member_list_servers::list_servers_integrated() && $user_id && is_numeric($user_id) && !in_array($user_id, $auto_processed) && is_array($vars) && is_string($event = (string) $event) && is_string($event_spec = (string) $event_spec) && (c_ws_plugin__s2member_utils_arrays::in_regex_array($event, $custom_reg_auto_op_outs) || c_ws_plugin__s2member_utils_arrays::in_regex_array($event_spec, $custom_reg_auto_op_outs)) && is_object($user = $_user = new WP_User($user_id)) && !empty($user->ID)) {
         $mod_new_role = $event_spec === 'modification' && $mod_new_role && is_string($mod_new_role) ? $mod_new_role : FALSE;
         // Might be empty(i.e. they now have NO Role).
         $mod_new_user = $event_spec === 'modification' && $mod_new_user && is_object($mod_new_user) && !empty($mod_new_user->ID) && $mod_new_user->ID === $_user->ID ? $mod_new_user : FALSE;
         $mod_old_user = $event_spec === 'modification' && $mod_old_user && is_object($mod_old_user) && !empty($mod_old_user->ID) && $mod_old_user->ID === $_user->ID ? $mod_old_user : FALSE;
         $user = $event_spec === 'modification' && $mod_old_user ? $mod_old_user : $_user;
         // Now, should we switch over to the old/previous User object ``$mod_old_user`` here? Or, should we use the one pulled by this routine with the User's ID?
         if (($event_spec !== 'modification' || $event_spec === 'modification' && (string) $mod_new_role !== c_ws_plugin__s2member_user_access::user_access_role($user) && strtotime($user->user_registered) < strtotime('-10 seconds') && ($event !== 'user-role-change' || $event === 'user-role-change' && !empty($vars['_p']['ws_plugin__s2member_custom_reg_auto_opt_out_transitions']))) && ($auto_processed[$user->ID] = TRUE)) {
             $removed = c_ws_plugin__s2member_list_servers::process_list_server_removals(c_ws_plugin__s2member_user_access::user_access_role($user), c_ws_plugin__s2member_user_access::user_access_level($user), $user->user_login, FALSE, $user->user_email, $user->first_name, $user->last_name, FALSE, TRUE, $user->ID);
             if ($event_spec === 'modification' && $mod_new_role && ($GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_auto_opt_out_transitions'] === '2' || $GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_auto_opt_out_transitions'] === '1' && $removed)) {
                 $user = $event_spec === 'modification' && $mod_new_user ? $mod_new_user : $_user;
                 // Now, should we switch over to a new/current User object ``$mod_new_user`` here? (which may contain newly updated details). Or, should we simply use the User object pulled by this routine with the User's ID?
                 $transitioned = c_ws_plugin__s2member_list_servers::process_list_servers($mod_new_role, c_ws_plugin__s2member_user_access::user_access_role_to_level($mod_new_role), $user->user_login, FALSE, $user->user_email, $user->first_name, $user->last_name, FALSE, TRUE, $removed ? FALSE : TRUE, $user->ID);
                 foreach (array_keys(get_defined_vars()) as $__v) {
                     $__refs[$__v] =& ${$__v};
                 }
                 do_action('ws_plugin__s2member_during_auto_process_list_server_removal_transitions', get_defined_vars());
                 unset($__refs, $__v);
             }
             foreach (array_keys(get_defined_vars()) as $__v) {
                 $__refs[$__v] =& ${$__v};
             }
             do_action('ws_plugin__s2member_during_auto_process_list_server_removals', get_defined_vars());
             unset($__refs, $__v);
         }
     }
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action('ws_plugin__s2member_after_auto_process_list_server_removals', get_defined_vars());
     unset($__refs, $__v);
 }
开发者ID:novichkovv,项目名称:candoweightloss,代码行数:62,代码来源:list-servers.inc.php

示例2: users_list_edit_cols


//.........这里部分代码省略.........
                 if (c_ws_plugin__s2member_utils_conds::pro_is_installed()) {
                     foreach (array_keys(get_defined_vars()) as $__v) {
                         $__refs[$__v] =& ${$__v};
                     }
                     do_action("ws_plugin__s2member_during_users_list_edit_cols_before_reset_pass_resend", get_defined_vars());
                     unset($__refs, $__v);
                     echo '<tr>' . "\n";
                     echo '<th><label for="ws-plugin--s2member-profile-reset-pass-resend">Reset Password &amp; Resend Welcome Email Message:</label> <a href="#" onclick="alert(\'Checking this box will tell s2Member to reset this User\\\'s password and then reprocess the New User Email Notification message against this User\\\'s account. This way they\\\'ll get an email message with their Username/Password.\\n\\nThis can be helpful in cases where a User/Member missed the original email message for some reason.\\n\\nThe User\\\'s password is reset to a new auto-generated password by default. However, you can provide a custom password by entering a new password of your choosing in the field above — provided by WordPress itself.\\n\\nIt is also possible to customize the New User Email Notification message with s2Member. Please see: `Dashboard -› s2Member -› General Options -› Email Configuration -› New User Notifications`.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
                     echo '<td><label><input type="checkbox" name="ws_plugin__s2member_profile_reset_pass_resend" id="ws-plugin--s2member-profile-reset-pass-resend" value="1" /> Yes, reset password &amp; resend welcome email message to this User.</label></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_reset_pass_resend", get_defined_vars());
                     unset($__refs, $__v);
                 }
             }
             if (c_ws_plugin__s2member_list_servers::list_servers_integrated()) {
                 foreach (array_keys(get_defined_vars()) as $__v) {
                     $__refs[$__v] =& ${$__v};
                 }
                 do_action("ws_plugin__s2member_during_users_list_edit_cols_before_opt_in", get_defined_vars());
                 unset($__refs, $__v);
                 echo '<tr>' . "\n";
                 echo '<th><label for="ws-plugin--s2member-profile-opt-in">Re-process List Servers:</label> <a href="#" onclick="alert(\'You have at least one List Server integrated with s2Member. Would you like to re-process a confirmation request for this User? If not, just leave the box un-checked.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
                 echo '<td><label><input type="checkbox" name="ws_plugin__s2member_profile_opt_in" id="ws-plugin--s2member-profile-opt-in" value="1" /> Yes, send a mailing list confirmation email to this User.</label></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_opt_in", get_defined_vars());
                 unset($__refs, $__v);
                 if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_out_transitions"]) {
                     if ($custom_reg_auto_op_outs = c_ws_plugin__s2member_utils_strings::wrap_deep($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_outs"], "/^", "\$/i")) {
                         if (c_ws_plugin__s2member_utils_arrays::in_regex_array("user-role-change", $custom_reg_auto_op_outs) || c_ws_plugin__s2member_utils_arrays::in_regex_array("modification", $custom_reg_auto_op_outs)) {
                             foreach (array_keys(get_defined_vars()) as $__v) {
                                 $__refs[$__v] =& ${$__v};
                             }
                             do_action("ws_plugin__s2member_during_users_list_edit_cols_before_auto_opt_out_transitions", get_defined_vars());
                             unset($__refs, $__v);
                             echo '<tr>' . "\n";
                             echo '<th><label for="ws-plugin--s2member-custom-reg-auto-opt-out-transitions">Allow List Transitioning:</label> <a href="#" onclick="alert(\'You\\\'ve configured s2Member with List Transitions enabled. By leaving this box checked, s2Member will Transition the User\\\'s mailing list subscription(s) automatically. For example, if a Member is demoted from Level #2, down to Level #1; s2Member will add them to the Level #1 List(s) after it removes them from the Level #2 List(s).\\n\\nDepending on your configuration of s2Member, a transition may ONLY occur if s2Member IS able to successfully remove them from an existing List. In other words, if they are currently NOT subscribed to any List(s), s2Member may NOT transition them to any new Lists (depending on your configuration).\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
                             echo '<td><label><input type="checkbox" name="ws_plugin__s2member_custom_reg_auto_opt_out_transitions" id="ws-plugin--s2member-custom-reg-auto-opt-out-transitions" value="1" checked="checked" /> Yes, automatically transition this User\'s mailing list subscription(s) when/if I change their Role.</label></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_auto_opt_out_transitions", 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_ip_restrictions", get_defined_vars());
             unset($__refs, $__v);
             echo '<tr>' . "\n";
             echo '<th><label for="ws-plugin--s2member-profile-ip-restrictions">Reset IP Restrictions:</label> <a href="#" onclick="alert(\'A single Username is only valid for a certain number of unique IP addresses (as configured in your s2Member -› General Options). Once that limit is reached, s2Member assumes there has been a security breach. At that time, s2Member will place a temporary ban (preventing access).\\n\\nIf you have spoken to a legitimate Customer that is receiving an error upon logging in (ex: 503 / too many IP addresses), you can remove this temporary ban by checking the box below. If the abusive behavior continues, s2Member will automatically re-instate IP Restrictions in the future. If you would like to gain further control over IP Restrictions, please check your General Options panel for s2Member.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
             echo '<td><label><input type="checkbox" name="ws_plugin__s2member_profile_ip_restrictions" id="ws-plugin--s2member-profile-ip-restrictions" value="1" /> Yes, delete/reset IP Restrictions associated with this Username.</label>' . (c_ws_plugin__s2member_ip_restrictions::specific_ip_restriction_at_or_above_max(strtolower($user->user_login)) || c_ws_plugin__s2member_ip_restrictions::specific_ip_restriction_breached_security(strtolower($user->user_login)) ? '<br /><em>*WARNING* this User is at (or above) max allowable IP addresses (based on your IP Restrictions).</em>' : '<br /><em>*Note* this User is NOT currently banned by any of your IP Restrictions.</em>') . '</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_ip_restrictions", get_defined_vars());
开发者ID:donwea,项目名称:nhap.org,代码行数:67,代码来源:users-list-in.inc.php

示例3: auto_process_list_server_removals

 /**
  * Listens to Collective EOT/MOD Events processed internally by s2Member.
  *
  * This is only applicable when ``["custom_reg_auto_opt_outs"]`` contains related Event(s).
  *
  * @package s2Member\List_Servers
  * @since 3.5
  *
  * @attaches-to ``add_action("ws_plugin__s2member_during_collective_mods");``
  * @attaches-to ``add_action("ws_plugin__s2member_during_collective_eots");``
  *
  * @param int|str $user_id Required. A WordPress User ID, numeric string or integer.
  * @param array $vars Required. An array of defined variables passed by the calling Hook.
  * @param str $event Required. A specific event that triggered this call from the Action Hook.
  * @param str $event_spec Required. A specific event specification *(a broader classification)*.
  * @param str $mod_new_role Required if ``$event_spec === "modification"`` (but can be empty). Role the User is being modified to.
  * @param str $mod_new_user Optional. If ``$event_spec === "modification"``, the new User object with current details.
  * @param str $mod_old_user Optional. If ``$event_spec === "modification"``, the old/previous User obj with old details.
  * @return null This function does not have a return value.
  */
 public static function auto_process_list_server_removals($user_id = FALSE, $vars = FALSE, $event = FALSE, $event_spec = FALSE, $mod_new_role = FALSE, $mod_new_user = FALSE, $mod_old_user = FALSE)
 {
     global $current_site, $current_blog;
     static $auto_processed = array();
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_before_auto_process_list_server_removals", get_defined_vars());
     unset($__refs, $__v);
     $custom_reg_auto_op_outs = c_ws_plugin__s2member_utils_strings::wrap_deep($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_outs"], "/^", "\$/i");
     if (c_ws_plugin__s2member_list_servers::list_servers_integrated() && $user_id && is_numeric($user_id) && !in_array($user_id, $auto_processed) && is_array($vars) && is_string($event = (string) $event) && is_string($event_spec = (string) $event_spec) && (c_ws_plugin__s2member_utils_arrays::in_regex_array($event, $custom_reg_auto_op_outs) || c_ws_plugin__s2member_utils_arrays::in_regex_array($event_spec, $custom_reg_auto_op_outs)) && is_object($user = $_user = new WP_User($user_id)) && !empty($user->ID)) {
         $mod_new_role = $event_spec === "modification" && $mod_new_role && is_string($mod_new_role) ? $mod_new_role : false;
         $mod_new_user = $event_spec === "modification" && $mod_new_user && is_object($mod_new_user) && !empty($mod_new_user->ID) && $mod_new_user->ID === $_user->ID ? $mod_new_user : false;
         $mod_old_user = $event_spec === "modification" && $mod_old_user && is_object($mod_old_user) && !empty($mod_old_user->ID) && $mod_old_user->ID === $_user->ID ? $mod_old_user : false;
         $user = $event_spec === "modification" && $mod_old_user ? $mod_old_user : $_user;
         // Now, should we switch over to the old/previous User object ``$mod_old_user`` here? Or, should we use the one pulled by this routine with the User's ID?
         if (($event_spec !== "modification" || $event_spec === "modification" && (string) $mod_new_role !== c_ws_plugin__s2member_user_access::user_access_role($user) && strtotime($user->user_registered) < strtotime("-10 seconds") && ($event !== "user-role-change" || $event === "user-role-change" && !empty($vars["_p"]["ws_plugin__s2member_custom_reg_auto_opt_out_transitions"]))) && ($auto_processed[$user->ID] = true)) {
             $removed = c_ws_plugin__s2member_list_servers::process_list_server_removals(c_ws_plugin__s2member_user_access::user_access_role($user), c_ws_plugin__s2member_user_access::user_access_level($user), $user->user_login, false, $user->user_email, $user->first_name, $user->last_name, false, true, $user->ID);
             if ($event_spec === "modification" && $mod_new_role && ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_out_transitions"] === "2" || $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_out_transitions"] === "1" && $removed)) {
                 $user = $event_spec === "modification" && $mod_new_user ? $mod_new_user : $_user;
                 // Now, should we switch over to a new/current User object ``$mod_new_user`` here? (which may contain newly updated details). Or, should we simply use the User object pulled by this routine with the User's ID?
                 $transitioned = c_ws_plugin__s2member_list_servers::process_list_servers($mod_new_role, c_ws_plugin__s2member_user_access::user_access_role_to_level($mod_new_role), $user->user_login, false, $user->user_email, $user->first_name, $user->last_name, false, true, $removed ? false : true, $user->ID);
                 foreach (array_keys(get_defined_vars()) as $__v) {
                     $__refs[$__v] =& ${$__v};
                 }
                 do_action("ws_plugin__s2member_during_auto_process_list_server_removal_transitions", get_defined_vars());
                 unset($__refs, $__v);
             }
             foreach (array_keys(get_defined_vars()) as $__v) {
                 $__refs[$__v] =& ${$__v};
             }
             do_action("ws_plugin__s2member_during_auto_process_list_server_removals", get_defined_vars());
             unset($__refs, $__v);
         }
     }
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action("ws_plugin__s2member_after_auto_process_list_server_removals", get_defined_vars());
     unset($__refs, $__v);
     return;
 }
开发者ID:donwea,项目名称:nhap.org,代码行数:62,代码来源:list-servers.inc.php

示例4: wrap_deep

 /**
  * Wraps a string with the characters provided.
  *
  * This is useful when preparing an input array for ``c_ws_plugin__s2member_utils_arrays::in_regex_array()``.
  *
  * @package s2Member\Utilities
  * @since 3.5
  *
  * @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
  * @param str $beg Optional. A string value to wrap at the beginning of each value.
  * @param str $end Optional. A string value to wrap at the ending of each value.
  * @param bool $wrap_e Optional. Defaults to false. Should empty strings be wrapped too?
  * @return str|array Either the input string, or the input array; after all data is wrapped up.
  */
 public static function wrap_deep($value = FALSE, $beg = FALSE, $end = FALSE, $wrap_e = FALSE)
 {
     if (is_array($value)) {
         foreach ($value as &$r) {
             /* Reference. */
             $r = c_ws_plugin__s2member_utils_strings::wrap_deep($r, $beg, $end, $wrap_e);
         }
         return $value;
         /* Return modified array. */
     }
     return strlen((string) $value) || $wrap_e ? (string) $beg . (string) $value . (string) $end : (string) $value;
 }
开发者ID:vinvinh315,项目名称:maintainwebsolutions.com,代码行数:26,代码来源:utils-strings.inc.php

示例5: auto_process_list_server_removals

 /**
  * Listens to Collective EOT/MOD events processed by s2Member.
  *
  * @since 3.5
  * @package s2Member\List_Servers
  *
  * @attaches-to `add_action('ws_plugin__s2member_during_collective_mods');`.
  * @attaches-to `add_action('ws_plugin__s2member_during_collective_eots');`.
  *
  * @param int|string $user_id Required. A WordPress User ID, numeric string or integer.
  * @param array      $vars Required. An array of defined variables passed by the calling hook.
  * @param string     $event Required. A specific event that triggered this call from the action hook.
  * @param string     $event_spec Required. A specific event specification *(a broader classification)*.
  * @param string     $mod_new_role Required if `$event_spec === 'modification'`; but can be empty. User role.
  * @param string     $mod_new_user Optional. If `$event_spec === 'modification'`, the new user object with current details.
  * @param string     $mod_old_user Optional. If `$event_spec === 'modification'`, the old/previous user obj with old details.
  *
  * @note This is only applicable when `['custom_reg_auto_opt_outs']` contains related Event(s).
  */
 public static function auto_process_list_server_removals($user_id, $vars, $event, $event_spec, $mod_new_role = NULL, $mod_new_user = NULL, $mod_old_user = NULL)
 {
     static $auto_processed = array();
     // Static cache.
     foreach (array_keys(get_defined_vars()) as $__v) {
         $__refs[$__v] =& ${$__v};
     }
     do_action('ws_plugin__s2member_before_auto_process_list_server_removals', get_defined_vars());
     unset($__refs, $__v);
     // Allows vars to be modified by reference.
     if (c_ws_plugin__s2member_list_servers::list_servers_integrated()) {
         if ($user_id && is_numeric($user_id) && !isset($auto_processed[$user_id])) {
             if (is_array($vars) && is_string($event = (string) $event) && is_string($event_spec = (string) $event_spec)) {
                 if ($custom_reg_auto_op_outs = c_ws_plugin__s2member_utils_strings::wrap_deep($GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_auto_opt_outs'], '/^', '$/i')) {
                     if (c_ws_plugin__s2member_utils_arrays::in_regex_array($event, $custom_reg_auto_op_outs) || c_ws_plugin__s2member_utils_arrays::in_regex_array($event_spec, $custom_reg_auto_op_outs)) {
                         if (is_object($dynamic_user = $user_now = new WP_User($user_id)) && $dynamic_user->exists() && !empty($dynamic_user->ID)) {
                             $mod_new_role = $event_spec === 'modification' && is_string($mod_new_role) ? $mod_new_role : '';
                             // Might be empty.
                             $mod_new_user = $event_spec === 'modification' && !empty($mod_new_user->ID) && $mod_new_user->ID === $dynamic_user->ID ? $mod_new_user : NULL;
                             $mod_old_user = $event_spec === 'modification' && !empty($mod_old_user->ID) && $mod_old_user->ID === $dynamic_user->ID ? $mod_old_user : NULL;
                             $dynamic_user = $event_spec === 'modification' && $mod_old_user ? $mod_old_user : $user_now;
                             // Use old user when applicable.
                             if ($event_spec !== 'modification' || $event_spec === 'modification' && $mod_new_role !== c_ws_plugin__s2member_user_access::user_access_role($dynamic_user) && strtotime($dynamic_user->user_registered) < strtotime('-10 seconds') && ($event !== 'user-role-change' || $event === 'user-role-change' && !empty($vars['_p']['ws_plugin__s2member_custom_reg_auto_opt_out_transitions']))) {
                                 $auto_processed[$dynamic_user->ID] = -1;
                                 // Flag as auto-processed!
                                 $auto_removal_success = c_ws_plugin__s2member_list_servers::process_list_server_removals(c_ws_plugin__s2member_user_access::user_access_role($dynamic_user), c_ws_plugin__s2member_user_access::user_access_level($dynamic_user), $dynamic_user->user_login, '', $dynamic_user->user_email, $dynamic_user->first_name, $dynamic_user->last_name, '', TRUE, $dynamic_user->ID);
                                 if ($event_spec === 'modification' && $mod_new_role && ($GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_auto_opt_out_transitions'] === '2' || $GLOBALS['WS_PLUGIN__']['s2member']['o']['custom_reg_auto_opt_out_transitions'] === '1' && $auto_removal_success)) {
                                     $dynamic_user = $event_spec === 'modification' && $mod_new_user ? $mod_new_user : $user_now;
                                     // New user; when applicable.
                                     $auto_transition_success = c_ws_plugin__s2member_list_servers::process_list_servers($mod_new_role, c_ws_plugin__s2member_user_access::user_access_role_to_level($mod_new_role), $dynamic_user->user_login, '', $dynamic_user->user_email, $dynamic_user->first_name, $dynamic_user->last_name, '', TRUE, $auto_removal_success ? FALSE : TRUE, $dynamic_user->ID);
                                     do_action('ws_plugin__s2member_during_auto_process_list_server_removal_transitions', get_defined_vars());
                                 }
                                 do_action('ws_plugin__s2member_during_auto_process_list_server_removals', get_defined_vars());
                             }
                         }
                     }
                 }
             }
         }
     }
     do_action('ws_plugin__s2member_after_auto_process_list_server_removals', get_defined_vars());
 }
开发者ID:EliasGoldberg,项目名称:troop-sim,代码行数:61,代码来源:list-servers.inc.php


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