Revert "Fix for visible state when creating new pages #1831"

This reverts commit 0f87a2691b.
This commit is contained in:
Andy Miller
2020-03-06 12:39:15 -07:00
parent f127d28bcd
commit 367d55d5e0
2 changed files with 3 additions and 4 deletions

View File

@@ -1848,7 +1848,7 @@ class Admin
$header = ['title' => $data['title']];
if (isset($data['visible'])) {
if ($data['visible'] === '') {
if ($data['visible'] === '' || $data['visible']) {
// if auto (ie '')
$pageParent = $page->parent();
$children = $pageParent ? $pageParent->children() : [];
@@ -1860,8 +1860,8 @@ class Admin
}
}
}
if (in_array($data['visible'], ["0", "1"])) {
$header['visible'] = (bool)$data['visible'];
if ((int)$data['visible'] === 1 && !$page->order()) {
$header['visible'] = $data['visible'];
}
}