Changeset 32645 for extensions
- Timestamp:
- Dec 4, 2021, 10:42:20 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/add_head_element/main.inc.php
r32382 r32645 42 42 load_language('plugin.lang', AHE_PATH); 43 43 } 44 /*45 add_event_handler('get_admin_plugin_menu_links', 'AHE_admin_menu');46 function AHE_admin_menu($menu){47 if (is_webmaster()){48 load_language('plugin.lang', AHE_PATH);49 $menu[] = array(50 'NAME' => l10n('Add < head > element'),51 'URL' => AHE_ADMIN,52 );53 }54 return $menu;55 }*/56 57 44 58 45 //add in <head> … … 60 47 function AHE1(){ 61 48 global $template,$conf; 62 if (isset($conf['add_head_element_apply_on'])) 63 { 64 if (!is_array($conf['add_head_element_apply_on'])) 65 { 49 if (isset($conf['add_head_element_apply_on'])){ 50 if (!is_array($conf['add_head_element_apply_on'])){ 66 51 $conf['add_head_element_apply_on'] = explode(',', $conf['add_head_element_apply_on']); 67 52 } 68 53 69 if (defined('IN_ADMIN') and IN_ADMIN) 70 { 54 if (defined('IN_ADMIN') and IN_ADMIN){ 71 55 // we are in the administration 72 if (!in_array('admin', $conf['add_head_element_apply_on'])) 73 { 56 if (!in_array('admin', $conf['add_head_element_apply_on'])){ 57 return; 58 } 59 }else{ 60 // we are in the gallery 61 if (!in_array('gallery', $conf['add_head_element_apply_on'])){ 74 62 return; 75 63 } 76 64 } 77 else78 {79 // we are in the gallery80 if (!in_array('gallery', $conf['add_head_element_apply_on']))81 {82 return;83 }84 }85 86 65 } 87 88 if (!empty($conf['add_head_element'])) 89 { 66 if (!empty($conf['add_head_element'])){ 90 67 $template->append('head_elements', $conf['add_head_element']); 91 68 }
Note: See TracChangeset
for help on using the changeset viewer.