Skip to:
Content

bbPress.org


Ignore:
Timestamp:
02/17/2022 06:36:20 PM (3 years ago)
Author:
johnjamesjacoby
Message:

Theme Compat: improve "no-js" body class swapping.

This change introduces a new helper function (bbp_swap_no_js_body_class()) which is used to output the <script> tag that was previously inside of the single template part that needed it.

It also adds a prefix (bbp) to those "no-js" body classes, with the intention of avoiding conflicts with other plugins & themes that may also be using the no-js body class for their own purposes.

Props dd32, r-a-y.

In branches/2.6 for 2.6.10. Fixes #3445.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/src/templates/default/bbpress/form-user-passwords.php

    r7189 r7230  
    1313// Filters the display of the password fields
    1414if ( apply_filters( 'show_password_fields', true, bbpress()->displayed_user ) ) : ?>
    15 
    16 <script type="text/javascript">
    17     document.body.className = document.body.className.replace( 'no-js', 'js' );
    18 </script>
    1915
    2016<div id="password" class="user-pass1-wrap">
Note: See TracChangeset for help on using the changeset viewer.