1

A few times i had (sadly and not proper) to hack a module, like changing some functions or default images, is it possible to hack a module in a proper way by "mymodule", in order to override simple things like changeing the returns of htlm or css with something like

mymodulefunction_moduleoriginalfunction(%args)

and make sure "mymodule" overrides my code running after original module?

0

No, it's not possible in the manner you are describing. However, Drupal provides many _alter() hooks that allow various things to be altered as necessary, so that you don't have to hack anything.

However, without specifics on what you want to do, I cannot suggest any specific methods.

0

Every module provides hook api, you can simply use that or create and apply patch as per your needs. Its a bad practice to hack or change the code in any core/contrib module.

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.