public body_class ( array $classes ) : array | ||
$classes | array | The existing array of body classes. |
return | array | $classes The updated array of body classes. |
public function body_class($classes)
{
// Add the class based on the current status.
$classes[] = $this->enabled() ? 'airplane-mode-enabled' : 'airplane-mode-disabled';
// Also add in the margin setup for Query Monitor because I'm a perfectionist.
if (!class_exists('QueryMonitor') || defined('QM_DISABLED') && QM_DISABLED) {
$classes[] = 'airplane-mode-no-qm';
}
// Return our array of classes.
return $classes;
}