What is the equivalent of body_class function, Envato rejects themes that used body_class and WordPress itself using it in TwentySixteen built-in theme … What should we do?
The body_class prints the most important css classes in the whole project, [ classes like - admin-bar, logged-in, etc. ] those are very important classes to increase the body margins for logged-in users because of admin menu.
I looked for an equivalent function to print these classes but nothing, There’s only one function handles the main style.
You should avoid and not to hardcode custom body_class().
Main reason for this is being able to remove the class when needed i.e. child themes.
What you can do - https://gist.github.com/kailoon/d4d22c9204909dff21eb
Exactly, so your rejection isn’t because you used the body_class function, it’s because you used it wrong. Use the function you’ve been given to filter your body classes, rather then adding an array directly to body_class.