EditFunctionHelper
Questions answered by this recipe
How can I easily manipulate the EditFunction array?
Description
How can I easily manipulate the $EditFunctions
array.
Installation
Just include_once the file on config and after that you are ready to use it.
It follows markup function signaling method (my function "<" before or ">" after this EditFunction array entry) .
Configuration
No configuration is necessary.
Usage
Include the function you want in a recipe or inside config.php, and after that inject the function inside $EditFunctions
array like this:
# p = place; r=remove and s=substitute # on action place you have to use the signaling "< or >" # before the edit function name # on remove and substitute actions, you should # not use signaling at all EditFunctionHelper("MyFunctionName",">RestorePage",(p|r|s));
This way "MyFunctionName" will be placed after "RestorePage" function.
You can also use menemonics like "b" for begin, the first position in the array or "e" for end, just for the place action, to append your function to the end of the array.
Change log / Release notes
20180301 - First version
20180320 - 2nd version - editfunctionhelper-20180320.phpΔ
See also
Contributors
CarlosAB March 20, 2018, at 04:09 AM
Comments
See discussion at EditFunctionHelper-Talk?
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.