This hook allows you to inject content at the top of the page header for public themes.
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_page_header', 'my_plugin_public_theme_page_header'); function my_plugin_public_theme_page_header($request) { echo "Content for page header"; }
New style (1.5 and above)
class MyPlugin extends Omeka_Plugin_Abstract { protected $_hooks = array( 'public_theme_page_header', ); public function hookPublicThemePageHeader($request) { echo "Content for page header"; } } $myplugin = new MyPlugin(); $myplugin->setUp();
Version History
- Added in Omeka 1.4