The usual process of adding a function in template.php called THEMENAME_epsacrop_widget_item does not work to override the theme_epsacrop_widget_item function in epsacrop.module

I noticed that the epsacrop_theme function specifically calls for the theme_epsacrop_widget_item function in line 370 of epsacrop.module.

If I replace the function called in line 370 with my THEMENAME_epsacrop_widget_item function in template.php, then I can see my overrides.

Should line 370 be altered so that it allows for a theme override function to be called?

Comments

yvmarques’s picture

Hello,

I tried to change it and unfortunately I think it's impossible. First, I don't know how to override a theme function without using [engine]_function_name() in one module, the only way I found its use hook_theme or hook_theme_registry_alter and in the both cases I couldn't override the function in one theme.

My second reason its the link, if I allow 3rd-party to override the function theme I increase the risks that they broke the module. But I'm open to anyone alternative :)

Regards,

-- Yvan

chrisla’s picture

Thanks for looking at that. It might be worth mentioning in the code since I've never encountered a theme_ function that wasn't editable before.

I used a different way to edit the "Manage image crop" text, by putting a string override into my settings.php file like this:

$conf['locale_custom_strings_en']['Manage image crops'] = 'Create a Thumbnail';

But I had to delete the '[' and ']' characters straight from the epsacrop.module file. Maybe those square brackets could be eliminated from being hard-coded into the module?

yvmarques’s picture

To help you, I can create a news theme function that allow you override the link theme ? I was working on the this few days ago.

Regards,

-- Yvan

yvmarques’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)