Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#9561 closed enhancement (fixed)

plugins_dir() and plugins_basename() should also work for plugins in the MU plugins dir

Reported by: Denis-de-Bernardy Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.8
Component: Plugins Keywords: has-patch tested
Focuses: Cc:


r10737 introduces a sweet new feature, but if a plugin in there relies on plugin_dir_url() to auto-magically get its url in order to include styles and scripts, it won't work as expected.

Attachments (2)

9561.diff (2.0 KB) - added by Denis-de-Bernardy 5 years ago.
missing_slash.patch (772 bytes) - added by alexrabe 5 years ago.

Download all attachments as: .zip

Change History (6)

Denis-de-Bernardy5 years ago

comment:1 DD325 years ago

+1 This looks like a good idea to me.

comment:2 azaozz5 years ago

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

(In [11069]) Make plugin_dir() and plugin_basename() work for mu-plugins directory, props Denis-de-Bernardy, fixes #9561

comment:3 alexrabe5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Since [11069] returns plugin_basename( dirname(FILE)) a slash at the beginning. If I'm not wrong then it's missing, see attached patch

alexrabe5 years ago

comment:4 azaozz5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [11072]) Remove slash from plugin_basename(), props alexrabe, fixes #9561

Note: See TracTickets for help on using tickets.