Skip to:
Content

bbPress.org


Ignore:
Timestamp:
07/04/2017 05:26:44 PM (6 years ago)
Author:
johnjamesjacoby
Message:

Template Packs: In default theme, only enqueue editor.js when in_bbpress().

This results in 1 fewer external asset being enqueued on non-bbPress pages.

Fixes #2930.

File:
1 edited

Legend:

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

    r6573 r6615  
    141141
    142142    /**
    143      * Enqueue the required Javascript files
     143     * Enqueue the required JavaScript files
    144144     *
    145145     * @since 2.1.0 bbPress (r3732)
     
    154154        $suffix  = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
    155155
    156         // Always pull in jQuery for TinyMCE shortcode usage
    157         if ( bbp_use_wp_editor() ) {
     156        // Editor scripts
     157        // @see https://bbpress.trac.wordpress.org/ticket/2930
     158        if ( bbp_use_wp_editor() && is_bbpress() ) {
    158159            $scripts['bbpress-editor'] = array(
    159160                'file'         => 'js/editor' . $suffix . '.js',
Note: See TracChangeset for help on using the changeset viewer.