I've just applied a theme and got an error such that I cannot even change the theme back to a working one (like Bartik).
I've read other threads but I could use hook_custom theme but I don't know how to get it to work.
What I'm doing is to edit the system.api.php and change the original lines of hook_custom_theme to this:
function hook_custom_theme() {
// Allow the user to request a particular theme via a query parameter.
if (1)) {
return 'bartik';
}
}
I've tried several variations but I don't know what I'm missing. Can anyone help me with this please?
Edit: I've realised that I need to write my own module to run that line of code, is it true? Is there a simpler way to just change the default theme or the weight of the themes programmatically somewhere?