function system_admin_compact_mode
Same name in other branches
- 9 core/modules/system/system.module \system_admin_compact_mode()
- 8.9.x core/modules/system/system.module \system_admin_compact_mode()
- 10 core/modules/system/system.module \system_admin_compact_mode()
- 11.x core/modules/system/system.module \system_admin_compact_mode()
Determines whether the current user is in compact mode.
Compact mode shows certain administration pages with less description text, such as the configuration page and the permissions page.
Whether the user is in compact mode is determined by a cookie, which is set for the user by system_admin_compact_page().
If the user does not have the cookie, the default value is given by the system variable 'admin_compact_mode', which itself defaults to FALSE. This does not have a user interface to set it: it is a hidden variable which can be set in the settings.php file.
Return value
TRUE when in compact mode, FALSE when in expanded mode.
4 calls to system_admin_compact_mode()
- seven_admin_block_content in themes/
seven/ template.php - Overrides theme_admin_block_content().
- theme_admin_block_content in modules/
system/ system.admin.inc - Returns HTML for the content of an administrative block.
- theme_system_compact_link in modules/
system/ system.module - Returns HTML for a link to show or hide inline help descriptions.
- user_admin_permissions in modules/
user/ user.admin.inc - Menu callback: administer permissions.
File
-
modules/
system/ system.module, line 2971
Code
function system_admin_compact_mode() {
// PHP converts dots into underscores in cookie names to avoid problems with
// its parser, so we use a converted cookie name.
return isset($_COOKIE['Drupal_visitor_admin_compact_mode']) ? $_COOKIE['Drupal_visitor_admin_compact_mode'] : variable_get('admin_compact_mode', FALSE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.