Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/26/2025 07:51:49 PM (6 months ago)
Author:
espellcaste
Message:

Restore no-js body class for BuddyPress pages.

Regression introduced at [13672], part of [13418].

Props r-a-y and vapvarun.

See #8679
See #9304 (14.0)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/14.0/src/bp-templates/bp-nouveau/buddypress-functions.php

    r14004 r14174  
    224224        remove_action( 'bp_enqueue_community_scripts', 'bp_core_confirmation_js' );
    225225
    226         /** This filter is documented in bp-core/bp-core-dependency.php */
    227         if ( is_buddypress() || ! apply_filters( 'bp_enqueue_assets_in_bp_pages_only', true ) ) {
    228             // Body no-js class.
    229             add_filter( 'body_class', array( $this, 'add_nojs_body_class' ), 20, 1 );
    230         }
     226        // Body no-js class.
     227        add_filter( 'body_class', array( $this, 'add_nojs_body_class' ), 20, 1 );
    231228
    232229        // Ajax querystring.
     
    475472     * @since 3.0.0
    476473     *
    477      * @param array $classes Array of classes to append to body tag.
    478      *
    479      * @return array $classes
     474     * @param string[] $classes Array of classes to append to body tag.
     475     * @return string[]
    480476     */
    481477    public function add_nojs_body_class( $classes ) {
     478        /** This filter is documented in bp-core/bp-core-dependency.php */
     479        if ( ! is_buddypress() || apply_filters( 'bp_enqueue_assets_in_bp_pages_only', true ) ) {
     480            return $classes;
     481        }
     482
    482483        $classes[] = 'no-js';
     484
    483485        return array_unique( $classes );
    484486    }
Note: See TracChangeset for help on using the changeset viewer.