Reimplement a global function


I'd like to reimplement item_image_gallery() in application/libraries/globals.php to include file metadata in the thumbnail or more generally alter how the thumbnails are presented in admin theme.

What's the best way to do this without adding a new function to globals.php? Would it go into a helper view in a plugin? I tried that (I think), but show.php did not seem to find the new function.


You can add new global functions in themes or plugins, but you can't "re-implement" ones with the same name (at least without invoking some PHP extensions and stuff... let's just say you can't).

But, as long as you're fine with having a differently-named function, and the editing of the views that use it, a plugin will work fine. You can also declare functions through a theme's custom.php.