Normalize working directory for plug-ins
|Reported by:||shadytrees||Owned by:|
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.