[wp-trac] [WordPress Trac] #54233: Hardcoded wp-content instead of using WP_CONTENT_DIR
WordPress Trac
noreply at wordpress.org
Wed Nov 24 18:31:09 UTC 2021
#54233: Hardcoded wp-content instead of using WP_CONTENT_DIR
--------------------------+------------------------------
Reporter: malthert | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: major | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------------------
Comment (by malthert):
Replying to [comment:8 SergeyBiryukov]:
> * The primary use of the `WP_CONTENT_DIR` and `WP_CONTENT_URL` constants
is not to rename the folder, it's to support subdirectory installations
with WordPress as an external.
Exactly, that's why WP_CONTENT_DIR needs to be checked if it already is
defined. Since the method of not checking it may not work (e.g. if we have
subdirectory/symlinked subdirectory, since __DIR__ will not be the correct
path)
> * The `WPINC` is not designed to be overridden or set in configurations,
and definitely should not be set for the purposes of having a custom
includes directory, as that is fundamentally not supported by WordPress.
Clear. I will revert the changes where I added a check !defined( 'WPINC'
in this pull request.
However still: all places where "wp-includes" is used, WPINC should be
used. As right now, it's a wild mix-mash of both (as can be seen in the
pull request) This part of the pull request can be merged?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54233#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list