本文整理汇总了PHP中cssJSToolbox::getCJTWebSiteURL方法的典型用法代码示例。如果您正苦于以下问题:PHP cssJSToolbox::getCJTWebSiteURL方法的具体用法?PHP cssJSToolbox::getCJTWebSiteURL怎么用?PHP cssJSToolbox::getCJTWebSiteURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cssJSToolbox
的用法示例。
在下文中一共展示了cssJSToolbox::getCJTWebSiteURL方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: enableAction
/**
* put your comment there...
*
*/
protected function enableAction()
{
// Initializing!
$model = $this->model;
$cjtWebServer = cssJSToolbox::getCJTWebSiteURL();
$extensions =& CJTPlugin::getInstance()->extensions();
// Get all CJT-Plugins (Include CJT Plugin itself + all its extensions) that has activate
// license key!
$activeLicenses = $model->getStatedLicenses();
// Import EDD updater Class!
cssJSToolbox::import('framework:third-party:easy-digital-download:auto-upgrade.class.php');
// Activate Automatic upgrade for all activated licenses/components!
foreach ($activeLicenses as $name => $state) {
// Get extension def doc.
// Act only if extension has XMl DOC! This might happened i fthe extension
// removed while its key still in the database
if ($extDef = $extensions->getDefDoc(dirname($state['component']['pluginBase']))) {
// Check CJT Server only if updateSrc points to Wordpress Repository
$updateSrcServer = (string) $extDef->license->attributes()->updateSrc;
if (!$updateSrcServer || $updateSrcServer == 'CJT') {
// Initializingn vars for a single state/component!
$pluginFile = ABSPATH . PLUGINDIR . '/' . $state['component']['pluginBase'];
// Stop using Cached Data as it causes issue, always
// get fresh plugin data.
$plugin = get_plugin_data($pluginFile);
$license =& $state['license'];
// Edd API parameter to be send along with he check!
$requestParams = array('version' => $plugin['Version'], 'author' => $plugin['AuthorName'], 'license' => $license['key'], 'item_name' => $name);
// Set EDD Automatic Updater!
$updated = new CJT_EDD_SL_Plugin_Updater($cjtWebServer, $pluginFile, $requestParams);
}
}
}
}
示例2: enableAction
/**
* put your comment there...
*
*/
protected function enableAction()
{
// Initializing!
$model = $this->model;
$cjtWebServer = cssJSToolbox::getCJTWebSiteURL();
$extensions =& CJTPlugin::getInstance()->extensions();
// Get all CJT-Plugins (Include CJT Plugin itself + all its extensions) that has activate
// license key!
$activeLicenses = $model->getStatedLicenses();
// Activate Automatic upgrade for all activated licenses/components!
foreach ($activeLicenses as $name => $state) {
// Get extension def doc.
// Act only if extension has XMl DOC! This might happened i fthe extension
// removed while its key still in the database
if ($extDef = $extensions->getDefDoc(dirname($state['component']['pluginBase']))) {
// Check CJT Server only if updateSrc points to Wordpress Repository
$updateSrcServer = (string) $extDef->license->attributes()->updateSrc;
if (!$updateSrcServer || $updateSrcServer == 'CJT') {
// Initializingn vars for a single state/component!
$pluginFile = ABSPATH . PLUGINDIR . '/' . $state['component']['pluginBase'];
$license =& $state['license'];
// Set EDD Automatic Updater!
try {
CJTStoreUpdate::autoUpgrade($name, $license['key'], $pluginFile);
} catch (CJTServicesAPICallException $exception) {
die('CJT AUTO-UPGRADE EXCAPTION!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
}
}
}
}
}
示例3: display
/**
* put your comment there...
*
* @param mixed $tpl
*/
public function display($tpl = null)
{
// Initialize.
$model =& $this->model;
// Set vars!
$this->securityToken = cssJSToolbox::getSecurityToken();
$this->component = $this->getRequestParameter('component');
$this->cjtWebSite = cssJSToolbox::getCJTWebSiteURL();
$this->licenseTypes = $model->getExtensionProductTypes($this->component);
$this->license = $model->getStateStruct($this->licenseTypes, 'license');
// Display view.
echo $this->getTemplate($tpl);
}
示例4: dispatchEddCall
/**
* put your comment there...
*
* @param mixed $action
* @param mixed $component
* @param mixed $license
*/
public function dispatchEddCall($action, $component, $license)
{
// Activating License key thorugh EDD APIs!
$request['edd_action'] = "{$action}_license";
$request['item_name'] = urlencode($component['name']);
$request['license'] = $license['key'];
/* CJT Extra Fields For EDD */
//$request['CJTEFFEDD_licenseName'] = $license['name'];
// Request the server!
$response = wp_remote_get(add_query_arg($request, cssJSToolbox::getCJTWebSiteURL()));
// We need only the JSON object returned by EDD APIs.
$response = @json_decode(wp_remote_retrieve_body($response), true);
// If request error compaitble the response object to be used!
if (!$response) {
$response = array('license' => 'error', 'component' => $component['name']);
}
return $response;
}
示例5: __construct
/**
* put your comment there...
*
*/
public function __construct()
{
# Initialize
$this->url = cssJSToolbox::getCJTWebSiteURL() . "cjtservices-api";
}