BP_Nouveau::add_nojs_body_class( array $classes )

Adds the no-js class to the body tag.

Description

This function ensures that the element will have the ‘no-js’ class by default. If you’re using JavaScript for some visual functionality in your theme, and you want to provide noscript support, apply those styles to body.no-js.

The no-js class is removed by the JavaScript created in buddypress.js.

Parameters

$classes

(Required) Array of classes to append to body tag.

Return

(array) $classes

Source

File: bp-templates/bp-nouveau/buddypress-functions.php

	public function add_nojs_body_class( $classes ) {
		$classes[] = 'no-js';
		return array_unique( $classes );
	}

Changelog

Changelog
Version Description
BuddyPress 3.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.