#3068 closed enhancement (wontfix)
Normalize working directory for plug-ins
| Reported by: | shadytrees | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | |
| Severity: | minor | Keywords: | |
| Cc: | Focuses: |
Description
For plug-ins, the working directory can vary for similar actions. comment_post can have a cwd of / (when a guest posts a comment to a post) while delete_comment can have a cwd of /wp-admin (when an administrator deletes a comment).
I ran into this when trying to figure out why a file to which I was (over)writing from a plug-in wasn't changing for all hooks. It (embarrassingly) took me a while to realize the file was in two different locations, / and /wp-admin, depending on the hook.
Could Wordpress normalize the cwd to / or something similar for plug-ins? For example, change the working directory to / before firing plug-in hooks.
Sorry if duplicate; my Trac search-fu isn't up to snuff.
Attachments (2)
Change History (9)
#1
@
20 years ago
I second that case, after submitting the bug "damn, why doesn't my WP find my wp-config.php if WP is built out of symlinks?"
#2
@
20 years ago
- Keywords has-patch added
Adding has-patch keyword; hoping it'll attract more attention. :)
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
An example cache plug-in that could write data to two different places