diff options
Diffstat (limited to 'modules/overlay/overlay.api.php')
-rw-r--r-- | modules/overlay/overlay.api.php | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/modules/overlay/overlay.api.php b/modules/overlay/overlay.api.php new file mode 100644 index 000000000..499c157c3 --- /dev/null +++ b/modules/overlay/overlay.api.php @@ -0,0 +1,46 @@ +<?php +// $Id$ + +/** + * @file + * Hooks provided by Overlay module. + */ + +/** + * @addtogroup hooks + * @{ + */ + +/** + * Allow modules to act when an overlay parent window is initialized. + * + * The parent window is initialized when a page is displayed in which the + * overlay might be required to be displayed, so modules can act here if they + * need to take action to accomodate the possibility of the overlay appearing + * within a Drupal page. + */ +function hook_overlay_parent_initialize() { + // Add our custom JavaScript. + drupal_add_js(drupal_get_path('module', 'hook') . '/hook-overlay.js'); +} + +/** + * Allow modules to act when an overlay child window is initialized. + * + * The child window is initialized when a page is displayed from within the + * overlay, so modules can act here if they need to take action to work from + * within the confines of the overlay. + */ +function hook_overlay_child_initialize() { + // Use a different theme for content administration pages. + if (arg(0) == 'admin' && arg(1) == 'content') { + if ($theme = variable_get('content_administration_pages_theme', FALSE)) { + global $custom_theme; + $custom_theme = $theme; + } + } +} + +/** + * @} End of "addtogroup hooks". + */ |