Allows plugins to hook in to the top of the `body` of public themes. Content added with this hook will appear at the very top of the `body`, outside any other markup on the page.
This hook receives the request object as the first argument, which allows the plugin writer to tailor the header output to a specific request (specific controller, action, etc.).
Arguments
- Zend_Controller_Request_Http
$request
{{#if - | (optional)}}
- {{#if: | Default:
{{{default}}}
}}
Example(s)
Old style (pre-1.5)
add_plugin_hook('public_theme_body', 'my_plugin_public_theme_body'); function my_plugin_public_theme_body($request) { echo "Content for the top of the body"; }
New style (1.5 and above)
class MyPlugin extends Omeka_Plugin_Abstract { protected $_hooks = array( 'public_theme_body' ); public function hookPublicThemeBody($request) { echo "Content for the top of the body"; } } $myplugin = new MyPlugin(); $myplugin->setUp();
Version History
- Added in Omeka 1.4