Skip to content
Anders G. Jørgensen edited this page Apr 10, 2014 · 3 revisions

This page lists all available hooks in a table. For more information on working with these hooks, read the module guide.

Hook Description Introduced in version
admin_head_main Hook between HTML head-tags in admin center. 4.7
admin_menu Filter hook. Allows to change the links in the main menu in the admin center. Links are listed in a multi-dimensional array with indexes href, img and txt. 4.7
admin_menu_before Hook in admin center just before the main menu. 4.7
admin_menu_after Hook in admin center just after the main menu. 4.7
admin_options_before Hook in admin center on 'options' page, just before the listed options. 4.7
admin_options_after Hook in admin center on 'options' page, just after the listed options. 4.7
admin_pages_before Hook in admin center on 'pages' page, just before 'new page' button. 4.7
admin_page_list_before Hook in admin center on 'pages' page, inside each page box, just before the first button (edit). 4.7
admin_page_list_inside Hook in admin center on 'pages' page, inside each page box, just after the first button (edit). 4.7
admin_page_list_after Hook in admin center on 'pages' page, inside each page box, just after the last button (delete). 4.7
admin_save_page_sidebar Hook in admin center on 'edit page' page, in the sidebar. 4.7
admin_save_page_beforepost Hook in admin center on 'edit page' page. Allows to add extra form elements to 'edit page' form. The content of these form elements can be processed with admin_save_page_afterpost. 4.7
admin_save_page_afterpost Filter hook. Allows modules to save additional data with pages. Data should be delivered in an array. The indexes of the array will be saved as variables in the page file. Can be used in combination with admin_save_page_beforepost. 4.7
admin_save_page Filter hook, inside save_page() function. Allows changing two variables: title and content of the saved page respectively. 4.7
admin_save_page_meta Filter hook, inside save_page() function. Allows changing two variables: description and keywords of the saved page respectively. 4.7
admin_save_page_module_additional_data Filter hook, inside save_page() function. Allows changing the complete additional data array supplied by modules for saving in a page. Adding new data to this array should be done with admin_save_page_afterpost. 4.7
admin_module_settings_beforepost Hook in admin center on 'module settings' page. Allows to add new form elements in order to save module settings for a module. The content of these form elements can be processed with admin_module_settings_afterpost. 4.7
admin_module_settings_afterpost Hook in admin center on 'module settings' page, after form has been sent. Can be used to process content of form elements added with admin_module_settings_beforepost. Data returned to this hook will be shown as an error. Module settings can be saved with the module_save_settings() function. 4.7
admin_settings_before Hook in admin center, on 'general settings' page, just before the HTML form. 4.7
admin_theme_before Hook in admin center, on 'choose theme' page, just before the HTML form. 4.7
const_page_dir Filter hook. Allows to change [[PAGE_DIR List-of-constants]].
const_home_page Filter hook. Allows to change [[HOME_PAGE List-of-constants]].
page_url_prefix Filter hook. Allows to change [[PAGE_URL_PREFIX List-of-constants]].
site_index Hook in index.php, before page generation starts. 4.7
site_theme Filter hook. Allows to change the theme. 4.7
site_theme_file Filter hook. Allows to change the theme file (php file inside theme dir). 4.7
site_theme_css Filter hook. Allows to change the theme css file. 4.7
theme_meta Hook between HTML head-tags in theme. 4.7
theme_content Filter hook. Allows to change page content fetched from page file. 4.7
theme_content_before Hook before page content in theme. 4.7
theme_content_after Hook after page content in theme. 4.7
tinymce_scripts Hook in between TinyMCE javascripts. 4.7
tinymce_plugins Hook inside TinyMCE options. Allows to add new options. 4.7
tinymce_options Hook inside TinyMCE plugins list. Allows to add new plugins. Returned code should start with a comma. Seperate new plugins with a comma too. 4.7
tinymce_buttons1 Filter hook. Allows changing the first row of buttons in TinyMCE. Buttons are listed in an array. 4.7
tinymce_buttons2 Filter hook. Allows changing the second row of buttons in TinyMCE. Buttons are listed in an array. 4.7
tinymce_buttons3 Filter hook. Allows changing the first row of buttons in TinyMCE. Buttons are listed in an array (by default empty). 4.7