This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2016-09-28 21:41:25 +02:00

34 lines
863 B
PHP

<?php
if (!isset($_GET['go']) || trim($_GET['go']) === '') die();
include_once(realpath('../../../../').'/wp-config.php');
$switch = htmlentities($_GET['go']);
function switchYarppPro($status){
$yarppPro = get_option('yarpp_pro');
$yarpp = get_option('yarpp');
if($status){
$yarppPro['optin'] = (bool) $yarpp['optin'];
$yarpp['optin'] = false;
} else {
$yarpp['optin'] = (bool) $yarppPro['optin'];
}
$yarppPro['active'] = $status;
update_option('yarpp',$yarpp);
update_option('yarpp_pro',$yarppPro);
header("HTTP/1.1 200");
header("Content-Type: text/plain; charset=UTF-8");
die('ok');
}
switch ($switch){
case 'basic':
switchYarppPro(0);
break;
case 'pro':
switchYarppPro(1);
break;
}