當前位置: 首頁>>代碼示例>>PHP>>正文


PHP RevSliderOperations::doPurchaseDeactivation方法代碼示例

本文整理匯總了PHP中RevSliderOperations::doPurchaseDeactivation方法的典型用法代碼示例。如果您正苦於以下問題:PHP RevSliderOperations::doPurchaseDeactivation方法的具體用法?PHP RevSliderOperations::doPurchaseDeactivation怎麽用?PHP RevSliderOperations::doPurchaseDeactivation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在RevSliderOperations的用法示例。


在下文中一共展示了RevSliderOperations::doPurchaseDeactivation方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: onAjaxAction


//.........這裏部分代碼省略.........
                 self::ajaxResponseData($responseData);
                 break;
             case "update_general_settings":
                 $operations->updateGeneralSettings($data);
                 self::ajaxResponseSuccess(__("General settings updated", 'revslider'));
                 break;
             case "update_posts_sortby":
                 $slider->updatePostsSortbyFromData($data);
                 self::ajaxResponseSuccess(__("Sortby updated", 'revslider'));
                 break;
             case "replace_image_urls":
                 $slider->replaceImageUrlsFromData($data);
                 self::ajaxResponseSuccess(__("Image urls replaced", 'revslider'));
                 break;
             case "reset_slide_settings":
                 $slider->resetSlideSettings($data);
                 self::ajaxResponseSuccess(__("Settings in all Slides changed", 'revslider'));
                 break;
             case "activate_purchase_code":
                 $result = false;
                 if (!empty($data['code'])) {
                     $result = $operations->checkPurchaseVerification($data);
                 } else {
                     RevSliderFunctions::throwError(__('The API key, the Purchase Code and the Username need to be set!', 'revslider'));
                     exit;
                 }
                 if ($result) {
                     self::ajaxResponseSuccessRedirect(__("Purchase Code Successfully Activated", 'revslider'), self::getViewUrl(self::VIEW_SLIDERS));
                 } else {
                     RevSliderFunctions::throwError(__('Purchase Code is invalid', 'revslider'));
                 }
                 break;
             case "deactivate_purchase_code":
                 $result = $operations->doPurchaseDeactivation($data);
                 if ($result) {
                     self::ajaxResponseSuccessRedirect(__("Successfully removed validation", 'revslider'), self::getViewUrl(self::VIEW_SLIDERS));
                 } else {
                     RevSliderFunctions::throwError(__('Could not remove Validation!', 'revslider'));
                 }
                 break;
             case 'dismiss_notice':
                 update_option('revslider-valid-notice', 'false');
                 self::ajaxResponseSuccess(__(".", 'revslider'));
                 break;
             case 'dismiss_dynamic_notice':
                 $notices_discarded = get_option('revslider-notices-dc', array());
                 $notices_discarded[] = esc_attr(trim($data['id']));
                 update_option('revslider-notices-dc', $notices_discarded);
                 self::ajaxResponseSuccess(__(".", 'revslider'));
                 break;
             case 'toggle_favorite':
                 if (isset($data['id']) && intval($data['id']) > 0) {
                     $return = self::toggle_favorite_by_id($data['id']);
                     if ($return === true) {
                         self::ajaxResponseSuccess(__('Setting Changed!', 'revslider'));
                     } else {
                         $error = $return;
                     }
                 } else {
                     $error = __('No ID given', 'revslider');
                 }
                 self::ajaxResponseError($error);
                 break;
             case "subscribe_to_newsletter":
                 if (isset($data['email']) && !empty($data['email'])) {
                     $return = ThemePunch_Newsletter::subscribe($data['email']);
開發者ID:zruiz,項目名稱:NG,代碼行數:67,代碼來源:revslider-admin.class.php


注:本文中的RevSliderOperations::doPurchaseDeactivation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。