mirror of
				https://github.com/getgrav/grav-plugin-admin.git
				synced 2025-10-31 02:16:26 +01:00 
			
		
		
		
	Fix for visible state when creating new pages #1831
This commit is contained in:
		| @@ -1848,7 +1848,7 @@ class Admin | ||||
|                 $header = ['title' => $data['title']]; | ||||
|  | ||||
|                 if (isset($data['visible'])) { | ||||
|                     if ($data['visible'] === '' || $data['visible']) { | ||||
|                     if ($data['visible'] === '') { | ||||
|                         // if auto (ie '') | ||||
|                         $pageParent = $page->parent(); | ||||
|                         $children = $pageParent ? $pageParent->children() : []; | ||||
| @@ -1860,8 +1860,8 @@ class Admin | ||||
|                             } | ||||
|                         } | ||||
|                     } | ||||
|                     if ((int)$data['visible'] === 1 && !$page->order()) { | ||||
|                         $header['visible'] = $data['visible']; | ||||
|                     if (in_array($data['visible'], ["0", "1"])) { | ||||
|                         $header['visible'] = (bool)$data['visible']; | ||||
|                     } | ||||
|  | ||||
|                 } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user