source: extensions/add_head_element/main.inc.php @ 21975

Last change on this file since 21975 was 14969, checked in by ddtddt, 12 years ago

[extensions] - add_head_element - clean code

File size: 896 bytes
Line 
1<?php
2/*
3Plugin Name: Plugin add < head > element
4Version: auto
5Description: Add element to tag < head >
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=582
7Author: ddtddt
8Author URI: http://piwigo.org/
9*/
10
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12
13global $prefixeTable;
14
15define('AHE_DIR' , basename(dirname(__FILE__)));
16define('AHE_PATH' , PHPWG_PLUGINS_PATH . AHE_DIR . '/');
17
18add_event_handler('get_admin_plugin_menu_links', 'AHE_admin_menu');
19function AHE_admin_menu($menu)
20{
21  array_push($menu, array(
22        'NAME' => 'Add < head > element',
23    'URL' => get_admin_plugin_menu_link(AHE_PATH . 'admin/admin.php')));
24  return $menu;
25}
26
27
28//add in <head>
29add_event_handler('loc_begin_page_header', 'AHE1',20 );
30
31function AHE1()
32{
33
34global $template,$conf;
35
36        if (!empty($conf['add_head_element']))
37        {
38    $template->append('head_elements', $conf['add_head_element']);
39        }
40 }
41?>
Note: See TracBrowser for help on using the repository browser.