Hook overwrite (deprecated)
From Sohowiki
(Difference between revisions)
Line 3: | Line 3: | ||
;Description | ;Description | ||
: Completely overwrites a source file with the file you specify. | : Completely overwrites a source file with the file you specify. | ||
− | : Original source file is renamed to filename.php-[plugin_folder_name] | + | : Original source file is renamed to filename.php-[plugin_folder_name] so it can be restored if plugin is uninstalled. |
'''Example 1 - calling hook_overwrite from your install_manifest.php''' | '''Example 1 - calling hook_overwrite from your install_manifest.php''' | ||
<pre>hook_overwrite("sohoadmin/program/main_menu.php", "your_modded_main_menu.php");</pre> | <pre>hook_overwrite("sohoadmin/program/main_menu.php", "your_modded_main_menu.php");</pre> |
Revision as of 17:59, 18 May 2006
- Syntax
- hook_overwrite(source file name, plugin file name)
- Description
- Completely overwrites a source file with the file you specify.
- Original source file is renamed to filename.php-[plugin_folder_name] so it can be restored if plugin is uninstalled.
Example 1 - calling hook_overwrite from your install_manifest.php
hook_overwrite("sohoadmin/program/main_menu.php", "your_modded_main_menu.php");