Skip to:
Content

bbPress.org

Opened 6 months ago

Last modified 6 months ago

#3255 assigned defect

Wrong constant used for loading scripts and styles

Reported by: studioreforma Owned by: johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5.14
Component: Appearance - Theme Compatibility Keywords: reporter-feedback
Cc:

Description

File includes/core/template-functions.php

The bbp_enqueue_style and bbp_enqueue_script functions use the wrong constant WP_CONTENT_DIR and the wrong content_url() function to prepare the styles/scripts for enqueue. Since the files are in the plugin folder, WP_PLUGIN_DIR and plugins_url() should be used instead.

Many WordPress installations have the plugins folder outside the content folder - WordPress allows this natively and it is a legitimate usage. The current code does not work in such installations.

Change History (2)

#1 @johnjamesjacoby
6 months ago

  • Component changed from General to Appearance - Theme Compatibility
  • Keywords reporter-feedback added
  • Milestone changed from Awaiting Review to 2.6
  • Owner set to johnjamesjacoby
  • Status changed from new to assigned
  • Version set to 2.5.14

In 2.6 this constant was moved to bbp_urlize_enqueueable().

Are you able to test with the latest from trunk and confirm if this approach fixes things?

Related: #1358.

#2 @johnjamesjacoby
6 months ago

My concern with hardcoding WP_PLUGIN_DIR is that rules out having bbPress in the mu-plugins directory, or even a custom directory inside of WP_CONTENT_DIR (which is how I have mine running.)

Note: See TracTickets for help on using tickets.