0

I have a site, where I want to alter the form of the image widget.

I have a admin theme and overlay activated. The Admin theme is set to the default 'seven' theme from the core (V7.14)

Now I want to write

function seven_image_widget($vars){
    $vars['element']['alt']['#title'] = 'Foo';
    return theme_image_widget($vars);
}

If I add this in the template.php of seven theme, it works, if I put it in my custom theme, it does not work. Can I access this theme hook of seven theme from my theme in any way? I don't want to change the core themes code.

0

I found it myself. If made a subtheme of seven (named sevensub) with just this special function in template.php

function sevensub_image_widget($vars){
    $vars['element']['alt']['#title'] = 'Foo';
    return theme_image_widget($vars);
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.