diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-12-02 07:28:22 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-12-02 07:28:22 +0000 |
commit | c912008307dd49b5e3e85c78069153f2f9f70411 (patch) | |
tree | 6e219858505bd38130a7d679488d3a41e689ce1d /modules/overlay/overlay.api.php | |
parent | cfc96df9a7181526cb1c71cf4e39886026c668fe (diff) | |
download | brdo-c912008307dd49b5e3e85c78069153f2f9f70411.tar.gz brdo-c912008307dd49b5e3e85c78069153f2f9f70411.tar.bz2 |
#610234 by Gábor Hojtsy, ksenzee, cwgordon7, David_Rothstein, seutje, marcvangend, sun, JoshuaRogers, markus_petrux, Bojhan, Rob Loach, Everett Zufelt, drifter, markboulton, leisareichelt, et al: Added Overlay module to core, which shows administrative pages in a JS overlay, retaining context on the front-end site.
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". + */ |