Skip to content

Commit

Permalink
Beta tests and consts detection for cloud api
Browse files Browse the repository at this point in the history
  • Loading branch information
Hai Zheng committed Sep 6, 2024
1 parent dcb7789 commit e97afc7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/cloud.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -1558,13 +1558,18 @@ public function ping()
'v_wp' => $GLOBALS['wp_version'],
);
if (!empty($_POST['funcs'])) {
foreach ($_POST['funcs'] as $func) {
$resp[$func] = function_exists($func) ? 'y' : 'n';
foreach ($_POST['funcs'] as $v) {
$resp[$v] = function_exists($v) ? 'y' : 'n';
}
}
if (!empty($_POST['classes'])) {
foreach ($_POST['classes'] as $cls) {
$resp[$cls] = class_exists($cls) ? 'y' : 'n';
foreach ($_POST['classes'] as $v) {
$resp[$v] = class_exists($v) ? 'y' : 'n';
}
}
if (!empty($_POST['consts'])) {
foreach ($_POST['consts'] as $v) {
$resp[$v] = defined($v) ? 'y' : 'n';
}
}
return self::ok($resp);
Expand Down
2 changes: 1 addition & 1 deletion tpl/toolbox/beta_test.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

// Existing public version list
$v_list = array(
'6.5',
'6.5.0.2',
'6.4.1',
'6.3.0.1',
'6.2.0.1',
Expand Down

0 comments on commit e97afc7

Please sign in to comment.