I really like Add class to body based on path alias.

Can I use this code in a Drupal website?

| |
  • Probably yes, but have a lawyer check over meta.stackoverflow.com/questions/286582/… and its linked posts if you want to be 100% sure in the context of your own product/jurisdiction – Clive Jan 26 '18 at 10:42
  • What about that post?meta.stackexchange.com/questions/271080/… – Stefanie Jan 26 '18 at 10:53
  • Yep read that one too – Clive Jan 26 '18 at 10:57
  • 1
    lol, such a small code snipped. Drupal API code is fair use, they can't copyright that. If this was a module, that would be a diff story. If you're paranoid just change the variable names, but even here you're going too far! I am sure $current_path and $path_alias are common intuitive variable names – No Sssweat Jan 30 '18 at 7:49

You must log in to answer this question.

Browse other questions tagged .