[wp-trac] [WordPress Trac] #11120: Issue with ABSPATH already defined
WordPress Trac
wp-trac at lists.automattic.com
Wed Nov 11 08:39:17 UTC 2009
#11120: Issue with ABSPATH already defined
--------------------------+-------------------------------------------------
Reporter: ontic | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: General | Version: 2.8.5
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
Comment(by dd32):
Your method of including wp-load is broken to start with.
{{{
$path = rtrim(dirname(dirname(dirname(FILE))), '/').'/';
}}}
will not always return the plugin directory, that directory can be moved
easily.
If you require wordpress to be loaded, either use admin-ajax.php, admin-
post.php, or access the frontpage directly, and hook upon 'init' to check
for your flag being set, and handle the request yourself..
Theres been a lot of discussion around this recently, and a few tickets
asking for a ajax front end handler.. (Which i'm in support of), But i'm
-1 to making it easier for anyone to hook wordpress as such you're
suggesting for the simple reason that it doesnt always work.. and makes
things a pain in the bum for those who use that function of WordPress.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11120#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list