Skip to content

Commit

Permalink
renamed Mac and Windows names
Browse files Browse the repository at this point in the history
Mac OS X to macOS and Windows 10 to Windows 10 (or later)
  • Loading branch information
Ethan Lin committed Jan 4, 2023
1 parent 1e33dc8 commit 075ab35
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@

<label class="src-cb"><input type="checkbox" name="windows_81" value="1" <?php checked('1', get_option('windows_81')); ?> />Windows 8.1 </label>

<label class="src-cb"><input type="checkbox" name="windows_10" value="1" <?php checked('1', get_option('windows_10')); ?> />Windows 10 </label>
<label class="src-cb"><input type="checkbox" name="windows_10" value="1" <?php checked('1', get_option('windows_10')); ?> />Windows 10 (or later) </label>

<label class="src-cb"><input type="checkbox" name="mac" value="1" <?php checked('1', get_option('mac')); ?> />Mac OS X </label>
<label class="src-cb"><input type="checkbox" name="mac" value="1" <?php checked('1', get_option('mac')); ?> />macOS </label>

<label class="src-cb"><input type="checkbox" name="linux" value="1" <?php checked('1', get_option('linux')); ?> />Linux </label>

Expand Down
33 changes: 17 additions & 16 deletions build/includes/class-system-requirements-check-shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,17 @@ public function getIP() {
public function checkOS() {

$osToCheck = array(
'/windows nt 5.1/i' => prep(get_option('windows_xp')),
'/windows nt 6.0/i' => prep(get_option('windows_vista')),
'/windows nt 6.1/i' => prep(get_option('windows_7')),
'/windows nt 6.2/i' => prep(get_option('windows_8')),
'/windows nt 6.3/i' => prep(get_option('windows_81')),
'/windows nt 10.0/i' => prep(get_option('windows_10')),
'/macintosh|mac os x/i' => prep(get_option('mac')),
'/linux/i' => prep(get_option('linux'))
'/windows nt 5.1/i' => prep(get_option('windows_xp')),
'/windows nt 6.0/i' => prep(get_option('windows_vista')),
'/windows nt 6.1/i' => prep(get_option('windows_7')),
'/windows nt 6.2/i' => prep(get_option('windows_8')),
'/windows nt 6.3/i' => prep(get_option('windows_81')),
'/windows nt 10.0/i' => prep(get_option('windows_10')),
'/macintosh|macos|mac os x/i' => prep(get_option('mac')),
'/linux/i' => prep(get_option('linux'))
);
$agent = $GLOBALS['system_to_check']->getAgent();

$os = '';
$icon = '';
$found = false;
Expand Down Expand Up @@ -137,11 +138,11 @@ public function checkOS() {
break;
case '/windows nt 10.0/i':
$icon = '<span class="icon-windows-new big"></span>';
$os = 'Windows 10';
$os = 'Windows 10 (or later)';
break;
case '/macintosh|mac os x/i':
case '/macintosh|macos|mac os x/i':
$icon = '<span class="icon-apple big"></span>';
$os = 'Mac OS X';
$os = 'macOS';
break;
case '/linux/i':
$icon = '<span class="icon-linux big"></span>';
Expand Down Expand Up @@ -204,11 +205,11 @@ public function recommendOS($i=false, $system='') {
}

if (prep(get_option('windows_10')) == '1') {
$result[] = '<span class="icon-windows-new '.$ico.'"></span> Windows 10';
$result[] = '<span class="icon-windows-new '.$ico.'"></span> Windows 10 (or later)';
}

if (prep(get_option('mac')) == '1') {
$result[] = '<span class="icon-apple '.$ico.'"></span> Mac OS X';
$result[] = '<span class="icon-apple '.$ico.'"></span> macOS';
}

if (prep(get_option('linux')) == '1') {
Expand Down Expand Up @@ -238,11 +239,11 @@ public function recommendOS($i=false, $system='') {
}

if (prep(get_option('windows_10')) == '1' && $system != 'Windows 10') {
$result[] = '<span class="icon-windows-new '.$ico.'"></span> Windows 10';
$result[] = '<span class="icon-windows-new '.$ico.'"></span> Windows 10 (or later)';
}

if (prep(get_option('mac')) == '1' && $system != 'Mac OS X') {
$result[] = '<span class="icon-apple '.$ico.'"></span> Mac OS X';
if (prep(get_option('mac')) == '1' && $system != 'macOS') {
$result[] = '<span class="icon-apple '.$ico.'"></span> macOS';
}

if (prep(get_option('linux')) == '1' && $system != 'Linux') {
Expand Down
2 changes: 1 addition & 1 deletion build/includes/class-system-requirements-check-system.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct() {
'/windows nt 6.1/i',
'/windows nt 6.0/i',
'/windows nt 5.1/i',
'/macintosh|mac os x/i',
'/macintosh|macos|mac os x/i',
'/linux/i'
);
$this->bro_array = array(
Expand Down
2 changes: 1 addition & 1 deletion config.codekit3
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
"displayValueWasSetByUser" : 0,
"iconImageName" : "meme-owl",
"iconImageWasSetByUser" : 0,
"lastBuiltDate" : 694470870.150491
"lastBuiltDate" : 694547929.40866697
},
"projectSettings" : {
"abortBuildOnError" : 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@

<label class="src-cb"><input type="checkbox" name="windows_81" value="1" <?php checked('1', get_option('windows_81')); ?> />Windows 8.1 </label>

<label class="src-cb"><input type="checkbox" name="windows_10" value="1" <?php checked('1', get_option('windows_10')); ?> />Windows 10 </label>
<label class="src-cb"><input type="checkbox" name="windows_10" value="1" <?php checked('1', get_option('windows_10')); ?> />Windows 10 (or later) </label>

<label class="src-cb"><input type="checkbox" name="mac" value="1" <?php checked('1', get_option('mac')); ?> />Mac OS X </label>
<label class="src-cb"><input type="checkbox" name="mac" value="1" <?php checked('1', get_option('mac')); ?> />macOS </label>

<label class="src-cb"><input type="checkbox" name="linux" value="1" <?php checked('1', get_option('linux')); ?> />Linux </label>

Expand Down
33 changes: 17 additions & 16 deletions source/includes/class-system-requirements-check-shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,17 @@ public function getIP() {
public function checkOS() {

$osToCheck = array(
'/windows nt 5.1/i' => prep(get_option('windows_xp')),
'/windows nt 6.0/i' => prep(get_option('windows_vista')),
'/windows nt 6.1/i' => prep(get_option('windows_7')),
'/windows nt 6.2/i' => prep(get_option('windows_8')),
'/windows nt 6.3/i' => prep(get_option('windows_81')),
'/windows nt 10.0/i' => prep(get_option('windows_10')),
'/macintosh|mac os x/i' => prep(get_option('mac')),
'/linux/i' => prep(get_option('linux'))
'/windows nt 5.1/i' => prep(get_option('windows_xp')),
'/windows nt 6.0/i' => prep(get_option('windows_vista')),
'/windows nt 6.1/i' => prep(get_option('windows_7')),
'/windows nt 6.2/i' => prep(get_option('windows_8')),
'/windows nt 6.3/i' => prep(get_option('windows_81')),
'/windows nt 10.0/i' => prep(get_option('windows_10')),
'/macintosh|macos|mac os x/i' => prep(get_option('mac')),
'/linux/i' => prep(get_option('linux'))
);
$agent = $GLOBALS['system_to_check']->getAgent();

$os = '';
$icon = '';
$found = false;
Expand Down Expand Up @@ -137,11 +138,11 @@ public function checkOS() {
break;
case '/windows nt 10.0/i':
$icon = '<span class="icon-windows-new big"></span>';
$os = 'Windows 10';
$os = 'Windows 10 (or later)';
break;
case '/macintosh|mac os x/i':
case '/macintosh|macos|mac os x/i':
$icon = '<span class="icon-apple big"></span>';
$os = 'Mac OS X';
$os = 'macOS';
break;
case '/linux/i':
$icon = '<span class="icon-linux big"></span>';
Expand Down Expand Up @@ -204,11 +205,11 @@ public function recommendOS($i=false, $system='') {
}

if (prep(get_option('windows_10')) == '1') {
$result[] = '<span class="icon-windows-new '.$ico.'"></span> Windows 10';
$result[] = '<span class="icon-windows-new '.$ico.'"></span> Windows 10 (or later)';
}

if (prep(get_option('mac')) == '1') {
$result[] = '<span class="icon-apple '.$ico.'"></span> Mac OS X';
$result[] = '<span class="icon-apple '.$ico.'"></span> macOS';
}

if (prep(get_option('linux')) == '1') {
Expand Down Expand Up @@ -238,11 +239,11 @@ public function recommendOS($i=false, $system='') {
}

if (prep(get_option('windows_10')) == '1' && $system != 'Windows 10') {
$result[] = '<span class="icon-windows-new '.$ico.'"></span> Windows 10';
$result[] = '<span class="icon-windows-new '.$ico.'"></span> Windows 10 (or later)';
}

if (prep(get_option('mac')) == '1' && $system != 'Mac OS X') {
$result[] = '<span class="icon-apple '.$ico.'"></span> Mac OS X';
if (prep(get_option('mac')) == '1' && $system != 'macOS') {
$result[] = '<span class="icon-apple '.$ico.'"></span> macOS';
}

if (prep(get_option('linux')) == '1' && $system != 'Linux') {
Expand Down
2 changes: 1 addition & 1 deletion source/includes/class-system-requirements-check-system.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct() {
'/windows nt 6.1/i',
'/windows nt 6.0/i',
'/windows nt 5.1/i',
'/macintosh|mac os x/i',
'/macintosh|macos|mac os x/i',
'/linux/i'
);
$this->bro_array = array(
Expand Down

0 comments on commit 075ab35

Please sign in to comment.