Which preprocess hook do I use to fire some HTML altering PHP?
you can use theme_preprocess_html(&amp;$variables) OR my_module_preprocess_html(&amp;$variables)

in $variables you will see $variables['classes_array']

if(in_array('class_name', $variables['classes_array'])) {

  //Do your changes

}


Hope this will help.