本文整理汇总了PHP中RevOperations::checkPurchaseVerification方法的典型用法代码示例。如果您正苦于以下问题:PHP RevOperations::checkPurchaseVerification方法的具体用法?PHP RevOperations::checkPurchaseVerification怎么用?PHP RevOperations::checkPurchaseVerification使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevOperations
的用法示例。
在下文中一共展示了RevOperations::checkPurchaseVerification方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onAjaxAction
//.........这里部分代码省略.........
break;
case "delete_custom_anim":
$arrAnims = $operations->deleteCustomAnim($data);
self::ajaxResponseSuccess(__("Animation saved succesfully!", REVSLIDER_TEXTDOMAIN), $arrAnims);
//,array("arrCaptions"=>$arrCaptions)
break;
case "update_slides_order":
$slider->updateSlidesOrderFromData($data);
self::ajaxResponseSuccess(__("Order updated successfully", REVSLIDER_TEXTDOMAIN));
break;
case "change_slide_image":
$slide->updateSlideImageFromData($data);
$sliderID = UniteFunctionsRev::getVal($data, "slider_id");
self::ajaxResponseSuccessRedirect(__("Slide Changed Successfully", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDES, "id={$sliderID}"));
break;
case "preview_slide":
$operations->putSlidePreviewByData($data);
break;
case "preview_slider":
$sliderID = UniteFunctionsRev::getPostGetVariable("sliderid");
$do_markup = UniteFunctionsRev::getPostGetVariable("only_markup");
if ($do_markup == 'true') {
$operations->previewOutputMarkup($sliderID);
} else {
$operations->previewOutput($sliderID);
}
break;
case "toggle_slide_state":
$currentState = $slide->toggleSlideStatFromData($data);
self::ajaxResponseData(array("state" => $currentState));
break;
case "slide_lang_operation":
$responseData = $slide->doSlideLangOperation($data);
self::ajaxResponseData($responseData);
break;
case "update_plugin":
self::updatePlugin(self::DEFAULT_VIEW);
break;
case "update_text":
self::updateSettingsText();
self::ajaxResponseSuccess(__("All files successfully updated", REVSLIDER_TEXTDOMAIN));
break;
case "update_general_settings":
$operations->updateGeneralSettings($data);
self::ajaxResponseSuccess(__("General settings updated", REVSLIDER_TEXTDOMAIN));
break;
case "update_posts_sortby":
$slider->updatePostsSortbyFromData($data);
self::ajaxResponseSuccess(__("Sortby updated", REVSLIDER_TEXTDOMAIN));
break;
case "replace_image_urls":
$slider->replaceImageUrlsFromData($data);
self::ajaxResponseSuccess(__("Image urls replaced", REVSLIDER_TEXTDOMAIN));
break;
case "reset_slide_settings":
$slider->resetSlideSettings($data);
self::ajaxResponseSuccess(__("Settings in all Slides changed", REVSLIDER_TEXTDOMAIN));
break;
case "activate_purchase_code":
$result = false;
if (!empty($data['username']) && !empty($data['api_key']) && !empty($data['code'])) {
$result = $operations->checkPurchaseVerification($data);
} else {
UniteFunctionsRev::throwError(__('The API key, the Purchase Code and the Username need to be set!', REVSLIDER_TEXTDOMAIN));
exit;
}
if ($result) {
self::ajaxResponseSuccessRedirect(__("Purchase Code Successfully Activated", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDERS));
} else {
UniteFunctionsRev::throwError(__('Purchase Code is invalid', REVSLIDER_TEXTDOMAIN));
}
break;
case "deactivate_purchase_code":
$result = $operations->doPurchaseDeactivation($data);
if ($result) {
self::ajaxResponseSuccessRedirect(__("Successfully removed validation", REVSLIDER_TEXTDOMAIN), self::getViewUrl(self::VIEW_SLIDERS));
} else {
UniteFunctionsRev::throwError(__('Could not remove Validation!', REVSLIDER_TEXTDOMAIN));
}
break;
case "dismiss_notice":
update_option('revslider-valid-notice', 'false');
self::ajaxResponseSuccess(__(".", REVSLIDER_TEXTDOMAIN));
break;
default:
self::ajaxResponseError("wrong ajax action: {$action} ");
break;
}
} catch (Exception $e) {
$message = $e->getMessage();
if ($action == "preview_slide" || $action == "preview_slider") {
echo $message;
exit;
}
self::ajaxResponseError($message);
}
//it's an ajax action, so exit
self::ajaxResponseError("No response output on <b> {$action} </b> action. please check with the developer.");
exit;
}