Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/04/2017 01:08:43 AM (9 years ago)
Author:
johnjamesjacoby
Message:

Scripts: Do not enqueue if not is_bbpress().

This reduces the number of external scripts that are enqueued on non-bbPress pages. Put another way, it makes sure that bbPress styles & scripts are only loaded on pages where bbPress content is known to exist.

Fibes #3138. Props DJPaul.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/templates/default/bbpress-functions.php

    r6615 r6641  
    156156        // Editor scripts
    157157        // @see https://bbpress.trac.wordpress.org/ticket/2930
    158         if ( bbp_use_wp_editor() && is_bbpress() ) {
     158        if ( bbp_use_wp_editor() ) {
    159159            $scripts['bbpress-editor'] = array(
    160160                'file'         => 'js/editor' . $suffix . '.js',
Note: See TracChangeset for help on using the changeset viewer.