mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-06-28 06:58:43 +02:00
Add new anonymous page hooks
- ADD_CSS_ANONYMOUS_PAGE - ADD_JAVASCRIPT_ANONYMOUS_PAGE - ADD_JAVASCRIPT_MODULE_ANONYMOUS_PAGE - ADD_HEADER_TAG_ANONYMOUS
This commit is contained in:
25
setup.php
25
setup.php
@ -200,6 +200,31 @@ function plugin_init_example() {
|
||||
],
|
||||
];
|
||||
|
||||
// Add specific files to add to the header into anonymous page : javascript or css
|
||||
$PLUGIN_HOOKS[Hooks::ADD_CSS_ANONYMOUS_PAGE]['example'] = 'example_anonymous.css';
|
||||
$PLUGIN_HOOKS[Hooks::ADD_JAVASCRIPT_MODULE_ANONYMOUS_PAGE]['example'] = 'mymodule_anonymous.js';
|
||||
$PLUGIN_HOOKS[Hooks::ADD_JAVASCRIPT_ANONYMOUS_PAGE]['example'] = 'example_anonymous.js';
|
||||
|
||||
// Add specific tags to the header into anonymous page
|
||||
$PLUGIN_HOOKS[Hooks::ADD_HEADER_TAG_ANONYMOUS_PAGE]['example'] = [
|
||||
[
|
||||
'tag' => 'meta',
|
||||
'properties' => [
|
||||
'name' => 'robots',
|
||||
'content' => 'noindex, nofollow',
|
||||
]
|
||||
],
|
||||
[
|
||||
'tag' => 'link',
|
||||
'properties' => [
|
||||
'rel' => 'alternate',
|
||||
'type' => 'application/rss+xml',
|
||||
'title' => 'The company RSS feed',
|
||||
'href' => 'https://example.org/feed.xml',
|
||||
]
|
||||
],
|
||||
];
|
||||
|
||||
// request more attributes from ldap
|
||||
//$PLUGIN_HOOKS['retrieve_more_field_from_ldap']['example']="plugin_retrieve_more_field_from_ldap_example";
|
||||
|
||||
|
Reference in New Issue
Block a user