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


PHP MS_Factory::delete_transient方法代码示例

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


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

示例1: delete

 /**
  * Delete transient.
  *
  * @since  1.0.0
  */
 public function delete()
 {
     do_action('ms_model_transient_delete_before', $this);
     $option_key = $this->option_key();
     MS_Factory::delete_transient($option_key);
     wp_cache_delete($option_key, 'MS_Model_Transient');
     do_action('ms_model_transient_delete_after', $this);
 }
开发者ID:klgrimley,项目名称:mzf,代码行数:13,代码来源:class-ms-model-transient.php

示例2: remove_application

 /**
  * Remove user application for this coupon.
  *
  * @since  1.0.0
  *
  * @param int $user_id The user id.
  * @param int $membership_id The membership id.
  */
 public static function remove_application($user_id, $membership_id)
 {
     $key = self::get_transient_name($user->id, $membership->id);
     MS_Factory::delete_transient($key);
     do_action('ms_addon_coupon_model_remove_application', $user_id, $membership_id);
 }
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:14,代码来源:class-ms-addon-coupon-model.php

示例3: verify_token

 /**
  * Verfies the admin token in the $_GET collection
  *
  * $_GET['ms_token'] must match the current ms_token
  * $_POST['confirm'] must have value 'yes'
  *
  * @since  1.0.0
  * @internal
  *
  * @param  string $action Like a nonce, this is the action to execute.
  * @return bool
  */
 private static function verify_token($action)
 {
     if (!self::valid_user()) {
         return false;
     }
     if (empty($_GET['ms_token'])) {
         return false;
     }
     $get_token = $_GET['ms_token'];
     if (empty($_POST['confirm'])) {
         return false;
     }
     if ('yes' != $_POST['confirm']) {
         return false;
     }
     $one_time_key = MS_Factory::get_transient('ms_one_time_key-' . $action);
     MS_Factory::delete_transient('ms_one_time_key-' . $action);
     if (empty($one_time_key)) {
         return false;
     }
     // We verify the current and the previous beat
     $plain_token_1 = $action . '-' . date('B') . ':' . get_current_user_id() . '-' . $one_time_key;
     $plain_token_2 = $action . '-' . (date('B') - 1) . ':' . get_current_user_id() . '-' . $one_time_key;
     if (wp_verify_nonce($get_token, $plain_token_1)) {
         return true;
     }
     if (wp_verify_nonce($get_token, $plain_token_2)) {
         return true;
     }
     return false;
 }
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:43,代码来源:class-ms-model-upgrade.php

示例4: remove_application

 /**
  * Remove user application for this invitation.
  *
  * @since  1.0.0
  *
  * @param int $user_id The user id.
  * @param int $membership_id The membership id.
  */
 public function remove_application($user_id, $membership_id)
 {
     $key = self::get_transient_name($user_id, $membership_id);
     MS_Factory::delete_transient($key);
     $this->remove_invitation_check();
     do_action('ms_addon_invitation_model_remove_application', $user_id, $membership_id, $this);
 }
开发者ID:nayabbukhari,项目名称:circulocristiano,代码行数:15,代码来源:class-ms-addon-invitation-model.php


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