[wp-trac] [WordPress Trac] #63102: Remove extra slashes when concatenating ABSPATH with a path, take 2

WordPress Trac noreply at wordpress.org
Fri Mar 14 13:19:11 UTC 2025


#63102: Remove extra slashes when concatenating ABSPATH with a path, take 2
------------------------------+----------------------------------------
 Reporter:  SergeyBiryukov    |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  low               |  Milestone:  6.8
Component:  General           |    Version:
 Severity:  minor             |   Keywords:  needs-patch good-first-bug
  Focuses:  coding-standards  |
------------------------------+----------------------------------------
 Previously: [54872] / #57074.

 There are a few of these lines in core:
 {{{
 require_once ABSPATH . '/wp-admin/includes/file.php';
 ...
 require_once ABSPATH . '/wp-admin/includes/plugin.php';
 }}}

 For consistency with the rest of core, the slash before `wp-admin` can be
 removed:
 {{{
 require_once ABSPATH . 'wp-admin/includes/file.php';
 ...
 require_once ABSPATH . 'wp-admin/includes/plugin.php';
 }}}
 as `ABSPATH` already includes a trailing slash.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63102>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list