Skip to:

Opened 7 years ago

Closed 6 years ago

#2930 closed enhancement (fixed)

Don't load editor.js file on non-bbpress pages

Reported by: slaffik's profile slaFFik Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: Tools - Code Improvements Keywords: needs-patch commit


Although it might be tricky, but I suppose most of sites don't load a bbPress editor on non-forums/topics pages.
So I assume this might be a good small optimization.


Change History (5)

#1 @netweb
7 years ago

  • Keywords reporter-feedback added
  • Milestone changed from Awaiting Review to Under Consideration

Thanks @slaFFik

I'm not seeing that loaded on a standard post page though e.g.

I do see the bbpress.css though: wp-content/plugins/bbpress/src/templates/default/css/bbpress.css

Where did you see editor.js loaded when it shouldn't be?

#2 @slaFFik
7 years ago

  • Keywords reporter-feedback removed

Ok, here are my details:

Plugins: BuddyPress 2.5.2 installed.
Groups forums are integrated with bbPress 2.x

editor.js is loaded on home page (didn't check other pages though).

#4 @johnjamesjacoby
6 years ago

  • Component changed from General to Tools - Code Improvements
  • Keywords commit added
  • Milestone changed from Under Consideration to 2.6

is_bbpress() now supports bbp_has_shortcode() so this is now achievable.

#5 @johnjamesjacoby
6 years ago

  • Owner set to johnjamesjacoby
  • Resolution set to fixed
  • Status changed from new to closed

In 6615:

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.

Note: See TracTickets for help on using tickets.