本文整理汇总了PHP中Redux_Helpers::trackingObject方法的典型用法代码示例。如果您正苦于以下问题:PHP Redux_Helpers::trackingObject方法的具体用法?PHP Redux_Helpers::trackingObject怎么用?PHP Redux_Helpers::trackingObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Redux_Helpers
的用法示例。
在下文中一共展示了Redux_Helpers::trackingObject方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: support_args
function support_args()
{
$this->options = get_option('redux-framework-tracking');
$this->options['dev_mode'] = false;
if (!isset($this->options['hash']) || !$this->options['hash'] || empty($this->options['hash'])) {
$this->options['hash'] = md5(network_site_url() . '-' . $_SERVER['REMOTE_ADDR']);
update_option('redux-framework-tracking', $this->options);
}
if (isset($_GET['redux_framework_disable_tracking']) && !empty($_GET['redux_framework_disable_tracking'])) {
$this->options['allow_tracking'] = false;
update_option('redux-framework-tracking', $this->options);
}
if (isset($_GET['redux_framework_enable_tracking']) && !empty($_GET['redux_framework_enable_tracking'])) {
$this->options['allow_tracking'] = true;
update_option('redux-framework-tracking', $this->options);
}
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
$instances = ReduxFrameworkInstances::get_all_instances();
if (isset($_REQUEST['i']) && !empty($_REQUEST['i'])) {
if (is_array($instances) && !empty($instances)) {
foreach ($instances as $opt_name => $data) {
if (md5($opt_name . '-debug') == $_REQUEST['i']) {
$array = $instances[$opt_name];
}
if ($data->args['dev_mode']) {
$this->options['dev_mode'] = $data->args['dev_mode'];
}
}
}
if (isset($array)) {
if (isset($array->extensions) && is_array($array->extensions) && !empty($array->extensions)) {
foreach ($array->extensions as $key => $extension) {
if (isset($extension->{$version})) {
$array->extensions[$key] = $extension->{$version};
} else {
$array->extensions[$key] = true;
}
}
}
if (isset($array->import_export)) {
unset($array->import_export);
}
if (isset($array->debug)) {
unset($array->debug);
}
} else {
die;
}
} else {
$array = Redux_Helpers::trackingObject();
if (is_array($instances) && !empty($instances)) {
$array['instances'] = array();
foreach ($instances as $opt_name => $data) {
$array['instances'][] = $opt_name;
}
}
$array['key'] = md5(AUTH_KEY . SECURE_AUTH_KEY);
}
echo @json_encode($array, true);
die;
}