| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /inetpub/wwwroot/business/sites/all/modules/panels/panels_ipe/ |
Upload File : |
<?php
/**
* @file
* Hooks provided by Panels In-Place Editor.
*/
/**
* Allow modules to control access to the Panels IPE.
*
* @param panels_display $display
* The panels display about to be rendered.
*
* @return TRUE|FALSE|NULL
* Returns TRUE to allow access, FALSE to deny, or NULL if the module
* implementing this hook doesn't care about access for the given display.
*/
function hook_panels_ipe_access(panels_display $display) {
// We only care about displays with the 'panelizer' context.
if (!isset($display->context['panelizer'])) {
return NULL;
}
if ($display->context['panelizer']->type[0] == 'entity:node') {
// Allow or deny IPE access based on node type.
return $display->context['panelizer']->data->type == 'awesome_page';
}
// Otherwise, deny access to everything!
return FALSE;
}